【请问】如何不开图,将dwg图中图框层里的图框按原坐标粘贴到另一张图纸或当前图纸中? - (defun c:tt( / dbx file ob path)
- (setq dbx (Vlax-Get-Or-Create-Object "ObjectDBX.AxDbDocument.16" ))
- (setq path "D:\\讲课\\批量图纸处理\")
- (foreach file (vl-directory-files path "*.dwg" 1)
- (Vlax-Invoke-Method dbx 'Open (strcat path file) );自己添加vl-catch-all-apply判断是否可以打开
- (vlax-for ob (Vlax-Get dbx 'ModelSpace)
- (cond
- ((= "AcDbText" (Vlax-Get ob 'ObjectName ))
- (cond
- ((= "深圳市小猫设计院" (Vlax-Get ob 'TextString ))
- (Vlax-Put ob 'TextString "深圳市老猫设计院")
- )
- ((= "2002 12" (Vlax-Get ob 'TextString ))
- (Vlax-Put ob 'TextString "2010 04")
- )
- )
- )
- )
- )
- (Vlax-Invoke-Method dbx 'SaveAs (strcat path file))
- )
- (vlax-release-object dbx)
- )
比较急没多少时间慢慢研究,求高手出手!
以下有猫老师利用DBX的不开图批量处理方法。
只有一个币,so...... |