beginner - code help
hi, I just started reading about lisp and made my first "script", but it is giving me an error after drawing the first rectangle, and wont draw the next. can anyone tell me what am I doing wrong? thanks in advance(defun c:pl()(command "_thickness" 1 "")(command "_circle" '(0 0 0) 1 "")(command "_circle" '(10 10 0) 1 "")(command "_rectangle" '(0 0 0) "_Dimension" 4 5 "")(command "_rectangle" '(10 10 0) "_Dimension" 4 5 "")(princ) ;;clean exit) (command "_rectangle" '(0 0 0) "_Dimension" 4 5 "")
command is waiting for input after "Specify width for rectangles : 5 prompt
Its either you replace the "" symbol with "\\" or pause for input
(command "_rectangle" '(0 0 0) "_Dimension" 4 5 "\\")
or provide a point list
(command "_rectangle" '(0 0 0) "_Dimension" 4 5 '(10 10 0) )
to place the rectangle of the first quadrant as coordinate '(10 10 0.0) is north east of the rectangles first point
or even
(command "_rectangle" '(0 0 0) "_Dimension" 4 5 (polar '(0 0 0)(* pi 0.25) 1))
HTH
And Welcome to the Forum neko_Designer Please pay also attention that all your command calls have an extra(the "") at their end.
(command "_thickness" 1 "")(command "_circle" '(0 0 0) 1 "")(command "_circle" '(10 10 0) 1 "")(command "_rectangle" '(0 0 0) "_Dimension" 4 5 "")
Another potential source of errors will come from active OSNAP modes - need to disable them before inputting points:
(command "_non" "_circle" '(0 0 0) 1)
I guess the OSNAP mode should be before the insertion point and not before the command name thanks everyone, you guys are great Any idea why this doesn't work either?
(command "_arc" "_Center" '(0 0 0) '(1 0 0) '(0 1 0) "")?
I'm trying to create an arc only on the first quadrant on this case. In general, I have two points as well as the center point where I want it located and want to generate the arc
I could also work with angles of beginning and end of the arc and the center point.
I really appreciate any suggestions. Try this ...
(command "_arc" "_C" "_none" '(0 0 0) "_none" '(1 0 0) "_none" '(0 1 0))
页:
[1]