hosyn 发表于 2022-7-6 06:30:22

what's wrong in my code-i

I wanna to insert block with the names :a11,a12,a13,a14...in my drawing one by one . How I can do it with the unik command same as: insb .??

(DEFUN C:Insb()(COMMAND "_insert" a11 pause 1 1 )(COMMAND "_insert" a12 pause 1 1 )(COMMAND "_insert" a13 pause 1 1 )(COMMAND "_insert" a14 pause 1 1 ))

MSasu 发表于 2022-7-6 06:41:23

You should provided the names as string; the command call is also missing the angle argument.

(DEFUN C:Insb()(COMMAND "_insert" "a11" pause 1 1 0 )(COMMAND "_insert" "a12" pause 1 1 0 )(COMMAND "_insert" "a13" pause 1 1 0 )(COMMAND "_insert" "a14" pause 1 1 0 ))
 
Don't miss, please, that the code will do the insertion only if the said block definitions were already available in the drawing or were located in a Support File Search Path folder (check in OPTIONS --> Files).

hosyn 发表于 2022-7-6 06:59:17

Dear MSasu , so thanx for your answer
I check this code everything is ok just when i insert this block i couldn't rotate them .I know that the zero (0) at the end of each line means that the angle rotation is zero.so i delete this zero from lines and run it again but after insert the first onethe program interrupt and insert just "a11" with rotation..!!!!!!!
I wanna rotation capability for each insert of my block ,how i can????

MSasu 发表于 2022-7-6 07:09:40

To allow user to have control over the insertion angle, use a PAUSE statement instead of a value for its argument:

(COMMAND "_insert" "a11" pause 1 1 pause )

hosyn 发表于 2022-7-6 07:12:58

greaaaaaaaaaaaaaaaaaaaaaaaaat soooooooooooooooo thanxxxxxxxxxxxxxto Mr MSasu .
It's that just I wanna .thanx a lot for your aid .:):):)

MSasu 发表于 2022-7-6 07:28:05

You're welcome, Hosyn! Glad I could helped!

SLW210 发表于 2022-7-6 07:36:35

Please use Code Tags for your code.
页: [1]
查看完整版本: what's wrong in my code-i