Hello all,
I apologize if there is similar post in this forum but i cant found it.
Often I have a problem like on the attached picture. To get drawing B from drawing A i must use trim and extend functions on lines with two parts (magenta yelow lines) or on single lines (blue ones). One part of line i must trim on white line and other part i must extend to white line. Single lines i must only extend or trim. If I only have one line, or one line with two parts that is not such a problem. However, if there are more of them it can be quite boring.
is there a chance someone to make me lisp like this:
1. to choose white line first.
2. to choose all other colored lines
After that the lisp command will make drawing B from drawing A.
This is just a sample. The color of lines is not valid in making lisp command.
Beside the picture bellow i got file of sample attached too
Thank you this will help me a lot and save my time.
Solved! Go to Solution.
Solved by ВeekeeCZ. Go to Solution.
Solved by Satoews. Go to Solution.
I am not quite getting what you are asking but I had an issue with trim till I found I could hold down shift while in the command and it turns it into the extend command. Maybe that helps?
Hi, try this. I just found it in my archive... looks good so far.
Edit: finally I've found my own version...
I see you already have some good solutions from very good people.
As an alternative, does this sound like what you want?
;; Multiple EXtend TRIM program allows user to select a group of ARCS, LINES,
;; or 2D POLYLINES as boundaries and select a group of LINES to extend or trim.
;; Intersection points are computed and the NEAREST endpoint is modified to the
;; point of intersection. There is no need to know whether each line should be
;; extended or trimmed, therefor eliminating time consuming zooms.
;; The program is written to reset all drawing variables to their initial
;; states. An "UNDO" command will remove all entities created, and restore
;; any deleted.
It's already written. Would just have to remove security to make it freeware.
John F. Uhden
I would be glad to post it, if I could find it.
It's not here at work with me so I hope it's at home. Will search.
John F. Uhden
Here ya go.
It's old, and it doesn't seem to be working the way I had thought.
If you have a collection of somewhat parallel lines (to be modified) and then say one arc, one polyline, and one line (boundaries) near each end of the lines, you can't be sure which of the boundary objects will be the limit of trimming or extending. But if you have just one boundary object at one or each end, then I think it works as expected.
John F. Uhden
If those magenta and yellow pieces share endpoints without overlapping, you can also do it by grip-editing. Just have INTersection running Object Snap turned on, grab all the magenta and yellow pieces [or even everything in the area including the white line], pick on a grip where two endpoints meet, and drag it to the INTersection of the white line with whichever of them INTersects it. That would be faster than using a Trim or Extend command and Shift to toggle, because the latter means doing something with each piece in a pair separately, but by grip-editing you can move the endpoints of both together.
thanks for the ExtendTrim Mr BeeKee! works for my use but could someone change the way it selects objects please?
I'd like to select a handful of lwpolylines, one of them closed, and have all the open polyline extend/trim to the closed one.
This selection works on its own but I cant get it to work in BeeKee's ExtendTrim
;ORIGINAL by Dexus
; throw an error of more than one closed poly selected??
(if (setq ss1 (ssget '((0 . "*LINE")))) (progn
(setq sx (ssadd) ; Create empty selectionset
ss (ssadd) ; Create empty selectionset
counter 0)
(repeat (setq i (sslength ss1)) ; Loop through selectionset and split into two sets
(setq e (ssname ss1 (setq i (1- i))))
(if (eq (cdr (assoc 70 (entget e))) 129) ; Decide which set to add to.
(ssadd e sx)
(ssadd e ss)
)
)
(setq ss1 nil) ; Remove origional set
@_anonandon wrote:
....
I'd like to select a handful of lwpolylines, one of them closed....
.... (if (eq (cdr (assoc 70 (entget e))) 129) ; Decide which set to add to. ....
Careful -- that test will recognize only closed LWPolylines with linetype generation enabled. The indicator for being closed is the 1 bit, and for a closed one without linetype generation enabled, that (assoc 70) value will be just 1, not 129. The additional 128 is the bit indicating that linetype generation is on.
This test will recognize that a Polyline is closed, whether or not linetype generation is enabled:
(if (= (logand (cdr (assoc 70 (entget e))) 1) 1)
@_anonandon wrote:
... I'd like to select a handful of lwpolylines, one of them closed, and have all the open polyline extend/trim to the closed one. ...
Possibly like this...
Can't find what you're looking for? Ask the community or share your knowledge.