incanu7 发表于 2022-7-5 16:06:27

给定poi的高程文本

我需要一种简单的方法来显示3dpoly(我的道路边缘)上任何给定点的高程。有点像命令ID,但是文本打印在我的模型空间中,可能有一个漂亮的X或一个圆形块来标记点。有人买了吗?
 
Thx提前

hanhphuc 发表于 2022-7-5 17:03:40

 
无论3dpoly等。。
可以通过以下方式查询UCS坐标:
getpoint函数
 
(defun c:test (/ p z str )
(while ;loop
(setq p (getpoint "\nSpecify point..")) ; returns x y z list
(setq z (caddr p)) ; 3rd element in list , z
(setq str (strcat "Z= "(rtos z 2))); convert to string
(terpri); next line

;to place text just complete your code here, where p=insertion point , str=contents
;using (command "TEXT" .... ) ; ...mimic the step in commandline
;or (entmake (list '(0 . "TEXT") .... )) ; dxf index 0 1 40 10 etc..

)
(princ) ;suppress
)

对于3dpoly,可能需要将对象捕捉模式设置为“结束”和“最近”
(设置变量osmode(+1 512))

Roy_043 发表于 2022-7-5 17:35:59

也可以使用包含引用插入点Z坐标的字段的属性创建块。
页: [1]
查看完整版本: 给定poi的高程文本