PDA

View Full Version : auxillary scale in lisp



mbrandt5
2015-07-27, 07:46 PM
How can I apply auxiliary scale to a block in lisp??...seeing as a block is only auxiliary scaled when the block is inserted from the tool palette...

If I can't apply auxiliary scale to a block then how can I insert a block from the tool palette with lisp??

GHarvey
2015-07-28, 02:13 PM
The auxiliary scale is not a special property of the block, but rather just a way of calculating what scale to use when initially inserting it. The two options are based on the Dimension scale and the Plot scale, and these can certainly be done with lisp. Just as a very basic example...


(defun c:insertdscale ( / )
(command "-insert" "MYBLOCK" pause (getvar "dimscale") "" 0.00)
)

(defun c:insertpscale ( / )
(vlax-invoke-method (vlax-get-property (vlax-get-property (vlax-get-acad-object) 'activedocument) 'activelayout) 'getcustomscale 'num 'den)
(command "-insert" "MYBLOCK" pause (/ num den) "" 0.00)
)

mbrandt5
2015-07-28, 05:42 PM
Is It possible for me to apply that method to for Dimscale to this predefined insert??

(command "_.-insert" "BlockName" insertpoint 1 1 0)

mbrandt5
2015-07-28, 06:04 PM
For anyone else interested this is how

(command "_.-insert" "BlockName" insertpoint (getvar "dimscale") (getvar "dimscale") 0)