Sub AddXRef_Example()
' This example adds an external reference using the c:\map.dwg file.
' You may need to change the path and filename to suit a file on your system.
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
' Add the external reference to the drawing
Set insertedXRef = ThisDrawing.ModelSpace.AttachExternalReference(sFullPathName, sXrefName, insPt, 1, 1, 1, 0, False)
MsgBox "The external reference '" & sFullPathName & "' is attached as '" & sXrefName & "'."
End Sub
Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved. |