snakebite729 发表于 2022-7-6 06:55:55

Inserting block (break line) u

Hi everyone,
 
I have a code that inserts a block that is included on all of my drawings. Sometimes a few hundred times on each drawing. It currently works, but I would like to eliminate a couple of the prompts to save pressing enter an extra 2 times.
 
I type the command "BB", then it prompts for insertion point, which is fine, then it prompts the following two things, which i would like to eliminate:
" Enter X scale factor, specify opposite corner, or : Enter Y scale factor : "and
" Pick Insertion point "
 
after those it prompts for rotation, which is also fine.
 
 
Here is the code:

(defun c:bb (/ pt) (while (setq pt (getpoint "\nPick Insertion point."))   (command "-insert" "1-20 BREAK" "_non" pt "" pause) ) (princ))
 
 
Thanks in advance,
 
Lyndon

pBe 发表于 2022-7-6 07:13:23

(command "_insert" "1-20 BREAK" "_Scale" "1" "_rotate" "0" "_non" pt "" pause)

snakebite729 发表于 2022-7-6 07:27:35

Thanks for the reply, but that did not work as i can no longer specify the rotation.

David Bethel 发表于 2022-7-6 07:51:27

Maybe:
 

   (command "-insert" "1-20 BREAK" "_non" pt 1 1 pause)
 
-David

snakebite729 发表于 2022-7-6 08:01:52

Thank you David, that worked perfectly.
页: [1]
查看完整版本: Inserting block (break line) u