neko_designer Posted December 19, 2013 Share Posted December 19, 2013 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 ) Quote Link to comment Share on other sites More sharing options...
pBe Posted December 19, 2013 Share Posted December 19, 2013 (edited) (command "_rectangle" '(0 0 0) "_Dimension" 4 5[b] ""[/b]) 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 [right upper corner] 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 Edited December 19, 2013 by pBe Quote Link to comment Share on other sites More sharing options...
MSasu Posted December 19, 2013 Share Posted December 19, 2013 Please pay also attention that all your command calls have an extra (the "") at their end. (command "_thickness" 1 [color=red]""[/color]) (command "_circle" '(0 0 0) 1 [color=red]""[/color]) (command "_circle" '(10 10 0) 1 [color=red]""[/color]) (command "_rectangle" '(0 0 0) "_Dimension" 4 5 [color=red]""[/color]) Another potential source of errors will come from active OSNAP modes - need to disable them before inputting points: (command [color=red]"_non"[/color] "_circle" '(0 0 0) 1) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted December 19, 2013 Share Posted December 19, 2013 Another potential source of errors will come from active OSNAP modes - need to disable them before inputting points: (command [color=red]"_non"[/color] "_circle" '(0 0 0) 1) I guess the OSNAP mode should be before the insertion point and not before the command name Quote Link to comment Share on other sites More sharing options...
neko_designer Posted December 19, 2013 Author Share Posted December 19, 2013 thanks everyone, you guys are great Quote Link to comment Share on other sites More sharing options...
neko_designer Posted December 19, 2013 Author Share Posted December 19, 2013 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. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted December 19, 2013 Share Posted December 19, 2013 Try this ... (command "_arc" "_C" "_none" '(0 0 0) "_none" '(1 0 0) "_none" '(0 1 0)) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.