IntelliCAD 11.1 Object Library | |
AttachExternalReference Method | |
See Also |
- PathName
The full path and file name of the drawing.
- Name
- The name of external reference to be created.
- InsertionPoint
- A Point object representing the point at which the drawing will be inserted.
- XScale
- The scale factor for the external reference along the x-axis.
- YScale
- The scale factor for the external reference along the y-axis.
- ZScale
- The scale factor for the external reference along the z-axis.
- Rotation
- The rotation angle (in radians) for the external reference.
- bOverlay
Boolean value:
TRUE = The external reference is an overlay.
FALSE = The external reference is an attachment.
ModelSpace Collection : AttachExternalReference Method |
Description
Syntax
Visual Basic |
---|
Public Function AttachExternalReference( _ ByVal PathName As String, _ Optional ByVal Name As String = "", _ Optional ByVal InsertionPoint As Point = 0, _ Optional ByVal XScale As Double = 1, _ Optional ByVal YScale As Double = 1, _ Optional ByVal ZScale As Double = 1, _ Optional ByVal Rotation As Double = 0, _ Optional ByVal bOverlay As Boolean = False _ ) As ExternalReference |
Parameters
- PathName
The full path and file name of the drawing.
- Name
- The name of external reference to be created.
- InsertionPoint
- A Point object representing the point at which the drawing will be inserted.
- XScale
- The scale factor for the external reference along the x-axis.
- YScale
- The scale factor for the external reference along the y-axis.
- ZScale
- The scale factor for the external reference along the z-axis.
- Rotation
- The rotation angle (in radians) for the external reference.
- bOverlay
Boolean value:
TRUE = The external reference is an overlay.
FALSE = The external reference is an attachment.
Example
' This example adds an external reference using the MAP.DWG file
' found in the Samples folder. You may need to change the path and
' filename for your system.
Dim insPt As IntelliCAD.Point
Dim insertedXRef As IntelliCAD.ExternalReference
Dim msg As String, PathName As String, XrefName As String
XrefName = InputBox("Type an XRef name")
Set insPt = Library.CreatePoint(1, 1, 0)
PathName = "c:\program files\IntelliCAD\Samples\map.dwg"
' Add the external reference to the drawing
Set insertedXRef = ThisDocument.ModelSpace.AttachExternalReference(PathName, XrefName, insPt, 1, 1, 1, 0, False)
MsgBox "The external reference '" & XrefName & "' is attached."
End Sub