As there are two different prompt sequences in "-insert", one for blocks which are allowed to be scaled uniformly only and other with separate scale factor prompt for each axis, is there a way to create common lisp for inserting both block types with uniformed scale factor (scale factor 1 etc on each direction)?
Command: -INSERT
Enter block name or [?] <block1>:
Units: Meters Conversion: 1.0000000
Specify insertion point or [Basepoint/Scale/Rotate]:
Command: -INSERT
Enter block name or [?] <block1>: block2
Units: Meters Conversion: 1.0000000
Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate]: Specify scale factor or [Corner/XYZ] <1>:
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
thank you for clue Henrique, yes, I got it working by setting rotate and scale prior base point. Also, rotate had to be set before scale.
(defun c:qin ()
(command "-insert" pause "_r" 0 "_s" 1 pause)
(princ)
)
first pause for user input for blockname, second for insertion point.
///
No logical solution here, just experimenting, for block insertion with user input also at rotation, it workes like this:
(defun c:yr ()
(command "-insert" pause pause 1 pause)
(princ)
)
the sequence of prompts here: blockname, basepoint, scalefactor, rotation
Robert
@robert06 wrote:
thank you for clue Henrique, yes, I got it working by setting rotate and scale prior base point. Also, rotate had to be set before scale.
(defun c:qin ()
(command "-insert" pause "_r" 0 "_s" 1 pause)
(princ)
)
first pause for user input for blockname, second for insertion point.
///
No logical solution here, just experimenting, for block insertion with user input also at rotation, it workes like this:
(defun c:yr ()
(command "-insert" pause pause 1 pause)
(princ)
)
the sequence of prompts here: blockname, basepoint, scalefactor, rotation
Robert
You're welcome, Robert.
To maintain the same user input to uniform and non-uniform scaled blocks with scale = 1, and allowing the user to enter the block name, insertion point and rotation angle, perhaps something like this
(defun c:yr () (command "-insert" "\\" "_s" 1 "\\" "\\") (princ) )
Henrique