付费框选使得
大概思路是框选然后获取每个点的坐标 然后bo出来 依次排序根据排序 自动编号并且把长宽尺寸都写出来 还能统计量汇总 参考源泉abh
(defun c:tt()
(setq ss (ssget))
(setq i 0)
(repeat (sslength ss)
(SETQ pt1 (Vlax-Invoke-Method (Vlax-Ename->Vla-Object (ssname ss i)) 'GetBoundingBox 'pa 'pb))
(setq pointlist (vlax-safearray->list pa))
(setq pt1 pointlist)
(setq pointlist (vlax-safearray->list pb))
(setq pt2 pointlist)
(setq ang (angle pt1 pt2 ))
(setq yx (/ (setq jl (distance pt1 pt2 ))2))
(setq yxd (polar pt1 ang yx ))
(setq i (1+ i ))
(command "MTEXT" yxd"h" "350" "w""0"i"")
)
) 我这个只能是图元的编号 不能排序 希望能完善 是按什么规则来排序?是对矩形排序还是对点排序? 都可以 对交点进行排序或者取点进行排序都可以达到同样的目的
页:
[1]