Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports Inventor
- ''' <summary>
- ''' The document object represents the Inventor Document,
- ''' it allows the you to rapidly access certain values and perform specific tasks
- ''' </summary>
- Public Class Document
- ''' <summary>
- ''' Read-only property that returns the <c>Inventor.Document</c> that is associative with the XT document.
- ''' </summary>
- ''' <example>Document.ReferencedDocument() As Inventor.Document</example>
- Public Overridable ReadOnly Property ReferencedDocument As Inventor.Document
- ''' <summary>
- ''' Creates a new XT document object
- ''' </summary>
- ''' <param name="InventorDocument">The Inventor document where the new XT document will be associated with.</param>
- ''' <example>Dim XTdocument as New Document(InventorDocument As Inventor.Document)</example>
- Public Sub New(ByVal InventorDocument As Inventor.Document)
- ' Store the InventorDocument as ReferencedDocument
- ReferencedDocument = InventorDocument
- End Sub
- Public Property Description As String
- Get
- ' Set reference to the document property sets
- Dim oPropertySets As PropertySets =
- ReferencedDocument.PropertySets
- ' Set reference to the Design Tracking Property set
- Dim oDesignTrackingPropertySet As PropertySet =
- oPropertySets.Item("Design Tracking Properties")
- ' Set reference to the Description property
- Dim oDescriptionProperty As [Property] =
- oDesignTrackingPropertySet.Item("Description")
- ' Return the description value (as string)
- Description = oDescriptionProperty.Value
- End Get
- Set(value As String)
- ' Set reference to the document property sets
- Dim oPropertySets As PropertySets =
- ReferencedDocument.PropertySets
- ' Set reference to the Design Tracking Property set
- Dim oDesignTrackingPropertySet As PropertySet =
- oPropertySets.Item("Design Tracking Properties")
- ' Set reference to the Description property
- Dim oDescriptionProperty As [Property] =
- oDesignTrackingPropertySet.Item("Description")
- ' Return the description value (as string)
- oDescriptionProperty.Value = value
- End Set
- End Property
- End Class
Add Comment
Please, Sign In to add comment