;;;by roy_043
(defun KGA_Conv_Pickset_To_ObjectList (ss / i ret)
(if ss
(repeat (setq i (sslength ss))
(setq ret (cons (vlax-ename->vla-object (ssname ss (setq i (1- i)))) ret))
)
)
)
(defun c:Test ( / cen cirLst doc linLst radNew radOld ss)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vla-endundomark doc)
(vla-startundomark doc)
(if
(and
(setq ss (ssget '((0 . "LINE,CIRCLE"))))
(setq radNew (getreal "\nNew radius: "))
)
(progn
(foreach obj (KGA_Conv_Pickset_To_ObjectList ss)
(if (= "AcDbLine" (vla-get-objectname obj))
(setq linLst
(vl-list*
(list (vlax-get obj 'startpoint) T obj)
(list (vlax-get obj 'endpoint) nil obj)
linLst
)
)
(setq cirLst (cons obj cirLst))
)
)
(foreach cir cirLst
(setq cen (vlax-get cir 'center))
(setq radOld (vla-get-radius cir))
(vla-put-radius cir radNew)
(foreach sub linLst
(if (equal radOld (distance cen (car sub)) 1e-8)
(progn
(vlax-put
(caddr sub)
(if (cadr sub) 'startpoint 'endpoint)
(vlax-curve-getclosestpointto cir (car sub))
)
(setq linLst (vl-remove sub linLst))
)
)
)
)
)
)
(vla-endundomark doc)
(princ)
)
This app was written by a friend of the forum. The program now has a problem by changing the diameter of the circle to lengthen or shorten the length of the line between the circles. It is not dealing with slashes. I am not familiar with the VLAX feature. Which friend can help me solve this problem? thank you for your help!