|
UpdateEntry Пример |
Sub Example_UpdateEntry()
'Этот пример добавляет вход в File Dependency List, возвращает его
'Индекс, обновляет вход и затем удаляет вход.
ThisDrawing.Application.Documents.Open ("c:\program files\autocad\sample\city map.dwg")
ThisDrawing.Application.ZoomAll
Dim objFDLCol As AutoCAD.AcadFileDependencies
Dim objFDL As AutoCAD.AcadFileDependency
Set objFDLCol = ThisDrawing.FileDependencies
MsgBox ("Число входов в File Dependency List " & objFDLCol.Count & ".")
Dim FDLIndex As Long
FDLIndex = objFDLCol.CreateEntry("acad:xref", "c:\referenced.dwg", True, True)
MsgBox ("Число входов в File Dependency List " & objFDLCol.Count & ".")
Dim IndexNumber As Long
IndexNumber = objFDLCol.IndexOf("acad:xref", "c:\referenced.dwg")
Dim IndexString As String
IndexString = CStr(IndexNumber)
MsgBox ("Индекс нового входа " & IndexString & ".")
objFDLCol.UpdateEntry (FDLIndex)
objFDLCol.RemoveEntry FDLIndex, True
MsgBox ("Число входов в File Dependency List " & objFDLCol.Count & ".")
End Sub