Message 1 of 16
Draw 2 lines and get the angle through Autolisp COMMANDS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello! I am new to figuring out Autolisp programming. I believe my biggest holdback is understanding what COMMANDS can return or how to access that information using the AUTOLISP. I am attempting to fully automate majority of a program I’m working on. I am stuck getting an angle of two lines drawn.
- Set the points
- Draw line 1
- Draw line 2
- Get the angle of line 1 and line2
;Get the angle of rotation
(setq point1Tension (list (car mountPoint1) (cadr mountPoint1) (+ (caddr mountPoint1) tension)))
(setq point1Compression (list (car mountPoint1) (cadr mountPoint1) (- (caddr mountPoint1) compression)))
(setq point2Compression (list (car mountPoint2) (cadr mountPoint2) (- (caddr mountPoint1) compression)))
(setq angle1Line1 (COMMAND "line" point1Tension point2Compression ""));Draw and get Line1 (CAN YOU SET LINE COLOR HERE?)
(setq angle1Line2 (COMMAND "line" point1Compression point2Compression ""));Draw and get Line2
(setq angle1 (COMMAND "MEASUREGEOM" "Angle" angle1Line1 angle1Line2 ""));get Angle 1