马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - (vl-load-com)
- (defun c:Example_CreateEntry()
- ;; This example adds an entry to the File Dependency List, returns its Index, updates
- ;; the entry, and then removes the entry.
- (setq acadObj (vlax-get-acad-object))
- (setq doc (vla-get-ActiveDocument acadObj))
-
- (setq objFDLCol (vla-get-FileDependencies doc))
- (alert (strcat "The number of entries in the File Dependency List is " (itoa (vla-get-Count objFDLCol)) "."))
-
- (setq FDLIndex (vla-CreateEntry objFDLCol "acad:xref" (findfile ".\\Sample\\Sheet Sets\\Architectural\\Res\\Wall Base.dwg") :vlax-true :vlax-true))
- (alert (strcat "The number of entries in the File Dependency List is " (itoa (vla-get-Count objFDLCol)) "."))
-
- (setq IndexNumber (vla-IndexOf objFDLCol "acad:xref" (findfile ".\\Sample\\Sheet Sets\\Architectural\\Res\\Wall Base.dwg")))
- (setq IndexString (itoa IndexNumber))
- (alert (strcat "The index of the new entry is " IndexString "."))
-
- (vla-UpdateEntry objFDLCol FDLIndex)
-
- (vla-RemoveEntry objFDLCol FDLIndex :vlax-true)
- (alert (strcat "The number of entries in the File Dependency List is " (itoa (vla-get-Count objFDLCol)) "."))
- )
|