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")) 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询