chip Posted October 18, 2017 Posted October 18, 2017 Hello all .. new to the board, my first post. I am cleaning up a number of drawings (sometimes 100 or 150 at a time) and am trying to set up a couple LISP routines to help. Can anyone help with creating a routine that combines the Lengthen command with a total distance of 30. Also, Lengthen, straight to the dynamic setting. The second would be to combine the Circle command with a radius of 30 and then being able to trim objects to the newly created circle. There are only a few keystrokes for each command to start with but when I have to preform them 4 or 5 times for each drawing x 100 or 150 drawings it would save a tremendous amount of time to be able to just have 1 keystroke. I am new to writing/editing LISP routines so any help would be greatly appreciated. Quote
dan113 Posted October 18, 2017 Posted October 18, 2017 A better explanation of what you are trying to achieve, maybe a before and after drawing. If you are trying to change objects in many drawings there is the possibility to do this without opening them using odbx. If you are changing many different things then a better solution could be found with just entmod and a while loop. Sent from my Pixel XL using Tapatalk Quote
chip Posted October 18, 2017 Author Posted October 18, 2017 A better explanation of what you are trying to achieve, maybe a before and after drawing. If you are trying to change objects in many drawings there is the possibility to do this without opening them using odbx. If you are changing many different things then a better solution could be found with just entmod and a while loop. Sent from my Pixel XL using Tapatalk I need to show 30' of an adjoining lot. I can do this by "length" then "total" with 30. On objects where there isn't a 30' tangent or arc I have to use "circle" and then "trim" to get 30. I am trying to bypass the extra steps and have a lisp routine combine some existing routines. Tks, Chip Quote
BIGAL Posted October 19, 2017 Posted October 19, 2017 Something like this (defun c:exd ( / obj objl) (setq dist (getreal "Enter distance" )) (while (setq obj (entsel "pick line <cr> to exit")) (setq pt (getpoint "Pick corner point")) (command "circle" pt dist) (setq lobj (entlast)) (command "extend" lobj "" pt "") (command "erase" lobj "") ) ) (C:exd) Quote
chip Posted October 19, 2017 Author Posted October 19, 2017 Something like this (defun c:exd ( / obj objl) (setq dist (getreal "Enter distance" )) (while (setq obj (entsel "pick line <cr> to exit")) (setq pt (getpoint "Pick corner point")) (command "circle" pt dist) (setq lobj (entlast)) (command "extend" lobj "" pt "") (command "erase" lobj "") ) ) (C:exd) Not working as needed. Looking for something that lets me specify a point to draw a circle from and then trim line(s) or arc(s) to the circle. Normally I draw a circle of 30, trim line/arc to circle, then erase circle. Trying to combine all into one. Tks, Chip Quote
BIGAL Posted October 19, 2017 Posted October 19, 2017 I posted the it is short version just use the same code method for a trim, add circle make this the trim object pick line outside of and all done. Yes two picks. To fully automate needs some rules pick line near end and check overhang trim or extend. 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.