hamidciv Posted September 29, 2014 Posted September 29, 2014 hi dear friends :(how can drawing object with different methods in autolisp? for example in normal command arc in below (command "arc" s c e "c") s= start point c=second point e=end point in this method arc drawed with start center end , but i want arc drawed with start center angle, how do this in autolisp? thanks a lot Quote
hanhphuc Posted September 29, 2014 Posted September 29, 2014 hi hamiciv, as a beginner, draw an ARC, explorer the dxf assoc list by (entget(car(entsel))) example: by guru David Bethel ;;;http://www.cadtutor.net/forum/showthread.php?83671-mandatory-DXF-for-LWPOLYLINE&highlight=mandatory HTH Quote
hamidciv Posted September 29, 2014 Author Posted September 29, 2014 hi hanhphuc i think you dont understand my guestion, i want drawing arc with star center angle method , that is also in toolbar autocad availabe. thanks Quote
hanhphuc Posted September 29, 2014 Posted September 29, 2014 (edited) hi hanhphuci think you dont understand my guestion, i want drawing arc with star center angle method , that is also in toolbar autocad availabe. thanks sorry i misunderstood.. (COMMAND "ARC" s "C" c "A" (- (angle c e) (angle c s))) if you use "COMMAND" (drawing object etc..) in your code, be careful if "osmode" is enabled. That's why we prefer entmake or vla-addArc (defun c:test (/ s c e); entmake (if (and (setq s (getpoint "\nStart.. ")) (setq c (getpoint "\nCenter.. ")) (setq e (getpoint "\nEnd..")) ) ;_ end of setq (entmakex (list '(0 . "ARC") (cons 10 c) (cons 40 (distance c s)) (cons 50 (angle c s)) (cons 51 (angle c e)) ) ;_ end of list ) ;_ end of entmakex ) ;_ end of if ) Edited September 30, 2014 by hanhphuc entmake example Quote
hamidciv Posted September 30, 2014 Author Posted September 30, 2014 (edited) thanks a lot dear hanhphuc I think the code is incorrect (COMMAND "ARC" s "C" c "A" (- (angle c e) (angle c s))) Edited September 30, 2014 by hamidciv Quote
mostafa badran Posted September 30, 2014 Posted September 30, 2014 Try this. (command "arc" "c" pause pause "angle" pause "") Quote
hamidciv Posted September 30, 2014 Author Posted September 30, 2014 dear mostafa if your possible , please explain more this command? What is your mean of the pause? Quote
mostafa badran Posted October 1, 2014 Posted October 1, 2014 dear mostafaif your possible , please explain more this command? What is your mean of the pause? pause is meant let user input, the command is suspended to allow direct user input (usually point selection or dragging). Quote
hanhphuc Posted October 1, 2014 Posted October 1, 2014 thanks a lot dear hanhphucI think the code is incorrect (COMMAND "ARC" s "C" c "A" (- (angle c e) (angle c s))) oops sorry, if automation "command" with variable not working maybe due to environment settings "angdir" or angle units in command input radians or degrees vice verse? (command "arc" "c" pause pause "angle" pause "") @mostafa badran, thanks Quote
mostafa badran Posted October 1, 2014 Posted October 1, 2014 @mostafa badran, thanks It's a pleasure. Quote
hamidciv Posted October 1, 2014 Author Posted October 1, 2014 very thanks dear mostafa & hanhphuc Quote
mostafa badran Posted October 1, 2014 Posted October 1, 2014 very thanks dear mostafa & hanhphuc your welcome happy to help. Quote
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.