Insert block repeatedly from dcl

Insert block repeatedly from dcl

Anonymous
Not applicable
827 Views
2 Replies
Message 1 of 3

Insert block repeatedly from dcl

Anonymous
Not applicable

Hello everyone Smiley Happy

 

I made a dcl for inserting company standard blocks, all is well untill I realized its more faster if I can insert the block multiple times.

the code below will ask for insertion point, rotate and done. I need it to continue on to ask for another insertion point until user press esc.

 

(defun c:insBLK () (command ".-insert" "c:\\folder1\\blk1.dwg" pause 1 "" pause))

This can be done in macro by including (*) before ^C^C but cant find a way to replicate through lisp.

Please help! Thanks in advance Smiley Happy

0 Likes
Accepted solutions (1)
828 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant
Accepted solution

Maybe like this....

 

(defun c:insBLK ( / pt)
  (while (setq pt (getpoint "\nSpecify insertion point <quit>: "))
    (command ".-insert" "c:\\folder1\\blk1.dwg" pt 1 "" pause))
  (princ)
)

But I would prefer using right mouse botton. Or space key.

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks for the reply BeekeeCZ, the right click works so much better than esc key....Thanks a million!!!!!!!! Smiley Very Happy

0 Likes