De- bulge for Polyline- editing
Hi,
Is there a 'de- bulge' command for Polyline- segments?
As much as I love using the QUAD but this command is missing for me. Removing a segment simply does not do the trick, but something else.
regards,
Clemens
0
Comments
-
Look at the 'adjust Bulge' option of the PEDITEXT command (you just have to hit enter after selecting the bulge) - it can also be found in the QUAD...0
-
Hi.Thanks for your response Knut.Unfortunately adjusting the bulge is something different than removing the bulge. That is what I really want to do.Simply create a line segment rather than an arc.I Should have been more specific about this.0
-
Here is some Lisp code that should do the trick.
Note: Tested on BricsCAD for Windows. Let me know if it works on the Mac version.
[code](defun c:Debulge ( / doc enme elst)
(if
(and
(setq enme (car (entsel)))
(vl-position '(0 . "LWPOLYLINE") (setq elst (entget enme)))
)
(progn
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(if (= (logand (getvar 'undoctl) 8) 8)
(vla-endundomark doc)
)
(vla-startundomark doc)
(entmod
(mapcar
'(lambda (sub)
(if (= 42 (car sub))
'(42 . 0.0)
sub
)
)
elst
)
)
(vla-endundomark doc)
)
)
(princ)
)[/code]0 -
... Here is code for a 'per segment' action:
[code](defun c:DebulgeSegment ( / doc lst obj)
(if
(and
(setq lst (entsel))
(setq obj (vlax-ename->vla-object (car lst)))
(vl-position (vla-get-objectname obj) '("AcDb2dPolyline" "AcDbPolyline"))
)
(progn
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(if (= (logand (getvar 'undoctl) 8) 8)
(vla-endundomark doc)
)
(vla-startundomark doc)
(vla-setbulge
obj
(fix
(vlax-curve-getparamatpoint
obj
(vlax-curve-getclosestpointto
obj
(trans (osnap (cadr lst) "_nea") 1 0)
)
)
)
0.0
)
(vla-endundomark doc)
)
)
(princ)
)[/code]0 -
Hi Roy,Your LISP works on the MAC. Thanks.Exactly does what I want.Only thing is that I have to reload all LSP's every time I start BricsCad. Is there a way to Auto Load LISP's?I really would like Bricsys to include de de- bulge function into QUAD.0
-
Some information on loading Lisp files is available on my website:
http://www.b-k-g.nl/loading-lisp-programs.html0
This discussion has been closed.