您好-第一个帖子在这里。希望有人能帮忙。
我有一个位于办公室服务器中央的模板dxe文件,用于插入一个引用特定块的特定属性的表(显示多段线区域)
lisp例程对当前图形执行反求“另存为”,将其保存为dxe引用的文件。。然后,它插入一个基于dxe模板的表。
但是,我需要它来从表中删除数据链接,因为我发现了一个问题,即如果一个用户运行它而不删除数据链接,然后另一个用户运行它。。原始用户表将更新。
我有一行代码可以删除所有数据链接,但是编写脚本来删除到新创建的表的数据链接并保留任何以前存在的链接超出了我的能力。非常感谢您的帮助。。
这是我的原样代码。
- (defun c:Atable (/ pt1)
- (SETVAR "cmdecho" 0)
- ;; saves current drawing as template reference file
- (command "._save" "V:/E-Library/Autocad/data extraction/DXTEMP FILE.dwg" "y")
- (princ "\nSelect point to insert table")
- (setq pt1 (getpoint))
- ;; inserts table based on template dxe file
- (command "-dataextraction" "V:/E-Library/Autocad/data extraction/DATAEXTRACT.dxe" pt1)
- ;; delete all data links but only want to delete the link created for the table
- (dictremove (namedobjdict) "ACAD_DATALINK")
- (princ)
- )
|