Jump to content

Help settinig up a couple cleanup LISP routines


chip

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

 

gCHE+LjOvuH4gAAAABJRU5ErkJggg==

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...