Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lisp to trim lines to block and trim polyline a bit more

6 REPLIES 6
Reply
Message 1 of 7
erickson123
2743 Views, 6 Replies

Lisp to trim lines to block and trim polyline a bit more

Hi All:

Does anyone have a lisp routine that will.......

I have a block that is a square (a drainage structure), and I represent a pipe going into the square with 2 lines on the outside and a polyline with thickness in the center (the 2 outside lines are the diameter of the pipe)....anyway I usually use the trim command and select the square then use fence to trim the lines/poly to the square..then use break to break the poly a little more away from the square.....

Anyway I was wondering if anyone has a lisp that will do this....

Thanks,
Lynn
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: erickson123

Here is my attempt at it.
Message 3 of 7
erickson123
in reply to: erickson123

Jason:

You ROCK!....

...can you make it not trim the lines the offset amount? So they will just trim to the block? (The poly will be the only part that trims the offset amoun)

and can I specify the offset about in the lisp?....say .5 ...?

Thanks for being so nice-
Lynn
:)
Message 4 of 7
Anonymous
in reply to: erickson123

Take this line out (setq of1 (getreal "\n Enter Trim Offset: "))
and change the of1 to ".5" in this (command "offset" of1 obj2 "0,0" "")
Message 5 of 7
erickson123
in reply to: erickson123

Very Cool-
Thank you very much!
Message 6 of 7
Anonymous
in reply to: erickson123

Your welcome.
There is much more you can automate starting with this lisp. You could have
it cycle through all the blocks and filter out a certain block and then run
the routine only on those blocks. But wasn't sure if that would of helped
are hurt you.
Message 7 of 7
erickson123
in reply to: erickson123

....as i'm sure you can tell beyond the 2 key this lisp stuff is so far beyond me...my brain just doesn't work that way...but I do make great pesto!...and before I'm dead I WILL be able to play a song on the guitar :)...at least one :0..maybe two-

automating it too much is excepting people to draw it right the first time....you know what I mean....

but....can you give me a hint about how to exclude not trimming the lines, they trim to the .5 also.....i've attached the lisp that I use to create the drain lines so you can see what I mean....insert a block, then draw a line from the center of the block...then use the lisp to create the line (DR)...then use your new lisp to trim....

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost