Reverse a line
Comments
-
I do not know the answer ....
but I am so happy to have Vectorworks using all 2D objects parametric
for direct Size Editing in properties palette - and offering a small gizmo (*),
that allows you to choose the center of scaling.
(*) Even by adapting the gizmo to your current drawing view, orthogonally
and isometrics.
And of course there is a button to switch Lines, Polylines, Walls, .... directions.0 -
I use this.
(defun c:rv ( / e_list e_type memb selset temp) (and (setq selset (ssget "_:L" '((0 . "LINE,LWPOLYLINE,SPLINE,ARC,CIRCLE")))) (setq e_list (vle-selectionset->list selset)) (foreach memb e_list (setq e_type (vle-entget 0 memb)) (cond ;; Line ( (eq "LINE" e_type) (setq temp (vle-entget 10 memb)) (vle-entmod 10 memb (vle-entget 11 memb)) (vle-entmod 11 memb temp) ) ;; LWPolyline ( (eq "LWPOLYLINE" e_type) (command "_pedit" memb "_R" "") ) ;; Arc ( (eq "ARC" e_type) (command "_pedit" memb "_Y" "_R" "") ) ;; Circle ( (eq "CIRCLE" e_type) (command "_pedit" memb "_Y" "_R" "") ) ;; SPLINE ( (eq "SPLINE" e_type) (vla-reverse (vlax-ename->vla-object memb)) ) ) ) ) (princ) )
0 -
-
Pedit reverses polylines. Pick your line Pedit , yes convert, revert . Then explode if you dont want it to stay pline0
-
Rotate it 180° about its midpoint.0
-
Thanks - all good - but Acad has a simple REVERSE command. Wonder why Brics doesn't.1
-
thanks!
0 -
This came up in another thread - best suggestion was to SCALE the line, picking its midpoint and entering -1 for the scale!
0 -
0
-
I often use a pick near start end you compare the pt to the actual start and endpoint distance and swap for calculations which can be enough or if you have to reverse the pline or line as suggested. I normally have as a defun for multi picks. Line example have extra check if pline use pedit reverse.
(setq ent (entsel "\nPIck crossing object near end Enter to exit "))
(setq pt (cadr ent))
(setq obj2 (vlax-ename->vla-object (car ent)))
(setq start (vlax-curve-getstartPoint obj2))
(setq end (vlax-curve-getendPoint obj2))
(setq d1 (distance pt start))
(setq d2 (distance pt end))
(if (> d1 d2)
(setq tmp start
start end
end tmp
)0