
CAD lisp 编程问题
请问一下,以下的编程哪里有错误。提示:Selecttitleblock:AutoCADError:nofunctiondefinition:BLK-GETATT(defu...
请问一下,以下的编程哪里有错误。提示:Select title block:AutoCAD Error: no function definition: BLK-GETATT
(defun c:tct ()
(vl-catch-all-apply
'(lambda (/ en obj str)
(if (setq str (getstring t "\nSpecify string to add:"))
(while (setq en (car (nentsel "\nSelect text to updata:")))
(setq obj (vlax-ename->vla-object en))
(and (or (vlax-property-available-p obj "textstring")
(not (princ " ** object doesn't have textstring **"))
)
(not (vla-put-textstring obj str))
)
)
)
)
)
)
(defun c:x1 (/ attlst def en obj)
(setq en (car (entsel "\nSelect title block:")))
(setq obj (vlax-ename->vla-object en))
(setq attlst (blk-getatt obj))
(foreach att attlst
(setq def (vla-get-tagstring att))
(cond ((eq def "PRINT_DATE") (vla-put-textstring att "14-03-2014"))
((eq def "REVISION") (vla-put-textstring att "a"))
;;A
((eq def "A_REV") (vla-put-textstring att "a"))
((eq def "A_DESCRIPTION") (vla-put-textstring att "1ST AIP RESUB"))
((eq def "A_DATE") (vla-put-textstring att "14-03-2014"))
((eq def "A_APPROVED") (vla-put-textstring att "BL")) 展开
(defun c:tct ()
(vl-catch-all-apply
'(lambda (/ en obj str)
(if (setq str (getstring t "\nSpecify string to add:"))
(while (setq en (car (nentsel "\nSelect text to updata:")))
(setq obj (vlax-ename->vla-object en))
(and (or (vlax-property-available-p obj "textstring")
(not (princ " ** object doesn't have textstring **"))
)
(not (vla-put-textstring obj str))
)
)
)
)
)
)
(defun c:x1 (/ attlst def en obj)
(setq en (car (entsel "\nSelect title block:")))
(setq obj (vlax-ename->vla-object en))
(setq attlst (blk-getatt obj))
(foreach att attlst
(setq def (vla-get-tagstring att))
(cond ((eq def "PRINT_DATE") (vla-put-textstring att "14-03-2014"))
((eq def "REVISION") (vla-put-textstring att "a"))
;;A
((eq def "A_REV") (vla-put-textstring att "a"))
((eq def "A_DESCRIPTION") (vla-put-textstring att "1ST AIP RESUB"))
((eq def "A_DATE") (vla-put-textstring att "14-03-2014"))
((eq def "A_APPROVED") (vla-put-textstring att "BL")) 展开
展开全部
您的程序不完整,按提示很显然是功能函数blk-getatt没有定义,但您又在以下语句有用到
(setq attlst (blk-getatt obj))
解决此问题请先定义此函数
(setq attlst (blk-getatt obj))
解决此问题请先定义此函数

2024-10-27 广告
CAD(计算机辅助设计)技术在上海艾羽信息科技有限公司的应用极为广泛。我们利用先进的CAD软件工具,精确高效地绘制产品设计图纸,从二维草图到三维建模,无所不能。这一技术不仅优化了设计流程,缩短了产品从概念到实物的周期,还通过精准的数据分析提...
点击进入详情页
本回答由VSH艾羽提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询