Hello. Is there a command that trims to a polyline midpoint when selecting an unwanted polyline half?
Thank you.
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
@stephenhicks.sub wrote:
.... Is there a command that trims to a polyline midpoint when selecting an unwanted polyline half? ....
If you can be counted on to select it in an unambiguous location [where nothing else might be "seen" instead], something like this [minimally tested]:
(defun C:PLCHO ; = PolyLine Cut Half Off
(/ plsel)
(setq plsel (entsel "\nSelect Polyline within half-length to be cut off: "))
(command "_.lengthen" "_total"
(/ (vlax-curve-getDistAtParam (car plsel) (vlax-curve-getEndParam (car plsel))) 2)
(cadr plsel) ""
); command
(princ)
); defun
As length is a property can also do this way.
Thanks Kent learn something new all the time "Lengthen"
(command "_.lengthen" "_total"
(/ (vlax-get (vlax-ename->vla-object (car plsel)) 'Length) 2)
(cadr plsel) ""
); command
Yes, one of my favorites commands. The command also has the "percent" option...
(defun c:PLCHO ()
(command "_.lengthen" "_percent" 50)
(princ)
)
Hello @stephenhicks.sub !
Great to see you here on LISP forum.
And you already received a solution! This is awesome!
Don't hesitate to ask any question you have by creating a new thread.
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям! | Do you find the posts helpful? "LIKE" these posts!
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.