如果“地图”块不是动态的,我会这样处理:
- (defun c:FOO (/ ss)
- (if (setq ss (ssget "_x" '((-4 . "<NOT")
- (2 . "MAP")
- (-4 . "NOT>")
- (8 . "ZZ-UKMAP-LANDLINE,ZZ-UKMAP-RAIL,ZZ-UKMAP-STATION,ZZ-UKMAP-STATION NAME"))))
- (command "._erase" ss "")
- (prompt "\n** Nothing selected ** "))
- (princ))
**未经测试,并写在我的MacBook上,我可以在上班时进行测试**
注意-应进行层检查,以确保层未首先锁定。
... 否则,我将使用vlax for逐步遍历选择集,有条件地使用块的有效名称进行限定。
HTH公司 |