AutoCAD/Auto Cad 2008 annotative?
Expert: Bill DeShawn - 12/3/2007
QuestionQUESTION: Can I do these with my ACAD 2008:
Have 2D vector dwg, city plan. I need to add some symbols for POWER STATIONS. When I am at enough zoom (wiev all) I can not see symbols for my power stations. Can I do something to achieve growing up my symbols. When I am at zoom can see only one street (for example)then my symbol must be onlu 2x2 m, but when I am at zoom can se all city, then my symbols must be 100x100. Because of that I must notice them. It is very similar, like Google earth can. When I scroll with my mouse up and down, some object need to grow up, to rise! Is it possibly?
Thank you very much!
ANSWER: Radislav:
No, it is not possible in any version of AutoCAD, to scroll with your mouse up and down and some objects would grow with the viewsize. It's an interesting concept, but it doesn't exist yet for blocks and Xrefs. However, a LISP routine can be written for the blocks you want to scale in place for them to be scaled to whatever scale you enter in at the command line. As a drafting program AutoCAD only needs to be able to put things in at a scale that is readable when it is printed on paper. Therefore such a LISP routine would be just as beneficial to those seeing your work on a large sheet. I'm going to check on something and will follow up with some more information, so stay tuned. It may be a couple of days.
Keep in touch
Bill DeShawn
http://my.sterling.net/~bdeshawn
---------- FOLLOW-UP ----------
QUESTION: It is very interesting problem, isn't it? You have a city plan and some points for maintenance, for example. When you give a map to any one, he can not see that points, because point is very small. Point (pipe valve on the street, telephone cabin, power station, etc) must be noticeable on the map, which is A3 format, or A2, depends on city area. You can not draw that entities very big, because they are not big, but for these reason
ANSWER: OK. First you said symbols which I would translate as blocks. Now you say points. Points are different and are variable in size depending on the VIEWSIZE system variable and the PDSIZE system variable. Points are probably what you would like to use. From HELP:
Specifying the value 32, 64, or 96 selects a shape to draw around the point, in addition to the figure drawn through it:
Then HELP goes on to tell you how to call different point shapes. If you use one type of point shape in your drawing, no other can be used. That is the drawback. Points are only one kind at a time and they are specified with PDMODE. To resize a point you need to REGEN.
Apart from that, I'm still looking into one other option of a LISP routine with reactors. Stay tuned.
Bill DeShawn
http://my.sterling.net/~bdeshawn
---------- FOLLOW-UP ----------
QUESTION: Excuse me, I didn't expressed correct. I thought BLOCK instead POINT. I'll be patient for your answer. Thank you very much!
AnswerI've posed the question on the autodesk newsgroup, and usually something like this would have people swarming all over it one trying to outdo the other. But apparently there isn't much interest in this topic. I can write a routine to resize blocks based on viewsize, but I don't know visual lisp well enough to create reactors.
Thanks for the nice feedback. Remember, though, that the routine I wrote targets blocks of a name that you either enter at the command line or select by clicking on a block. It has nothing to do with layer selection. If all your blocks of the same name are on the same layer, it may seem like it has to do with a layer, but the routine doesn't look at that - only the name of the block.
Keep in touch
Bill DeShawn
http://my.sterling.net/~bdeshawn
Try this: I wrote a routine for you so that you could at least do a global scale factor for now.
(defun bverr (msg)
(if msg (princ msg))
(command "_undo" "_end")
(if olderr (setq *error* olderr))
(princ)
)
(defun bvscblk (/ b-ent b-list scf sset sslen index ent elist ip)
(command "_.undo" "_g")
(setq scf (getreal "\nRelative Scale Factor: "))
(setq sset (ssget "x" (list (cons 2 bname))))
(if sset
(progn
(setq sslen (sslength sset))
(setq index 0)
(repeat sslen
(setq ent (ssname sset index))
(setq elist (entget ent))
(setq ip (assoc 10 elist))
(command "_.scale" ent "" (cdr ip) scf)
(setq index (1+ index))
)
)
)
(princ)
)
(defun c:bv (/ ent elist divisor dividend decequiv alblox bloxqty index blk blklst origscale factor ip resp)
(command "_.undo" "_g")
(setq bname (getstring "\nEnter block name or press ENTER to select: "))
(if (= bname "") (setq ent (entsel)))
(if ent
(progn
(setq elist (entget (car ent)))
(setq bname (cdr (assoc 2 elist)))
)
)
(if (null bname)
(progn
(princ "\nNo blocks selected. ")
(exit)
)
)
(command "_zoom" "_e")
(setq divisor (getvar "viewsize"))
(command "_.zoom" "_p")
(setq dividend (getvar "viewsize"))
(setq decequiv (/ dividend divisor))
(setq alblox (ssget "x" (list (cons 2 bname))))
(setq bloxqty (sslength alblox))
(setq index 0)
(repeat bloxqty
(setq blk (ssname alblox index))
(setq blklst (entget blk))
(setq origscale (cdr (assoc 41 blklst)))
(setq factor (* origscale decequiv))
(setq ip (cdr (assoc 10 blklst)))
(command "_.scale" blk "" ip decequiv)
(setq index (1+ index))
)
(setq resp (strcase (getstring "\nIs this OK? Y\N <Y> ")))
(if (/= resp "")(setq resp "N"))
(if (= resp "N") (progn (command "_.undo" bloxqty) (bvscblk)))
(setq *error* olderr)
(command "_.undo" "_end")
(princ)
)
Put the above code in a text file called BV.LSP.
Load with APPLOAD or (load "BV")
type BV to execute in AutoCAD.
Keep in touch
Bill DeShawn
http://my.sterling.net/~bdeshawn