AttachExternalReference method example
Sub AddXRef_Example()
Dim insPt(0 To 2) As Double
Dim insertedXRef As AcadExternalReference
Dim sFullPathName As String: sFullPathName = "c:map.dwg"
Dim sXrefName As String: sXrefName = "The Map"
insPt(0) = 0: insPt(1) = 0: insPt(2) = 0
Set insertedXRef = ThisDrawing.ModelSpace.AttachExternalReference(sFullPathName, sXrefName, insPt, 1, 1, 1, 0, False)
MsgBox "The external reference '" & sFullPathName & "' is attached as '" & sXrefName & "'."
End Sub
© Bricsys NV. All rights reserved. |