daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports Inventor
  2.  
  3. ''' <summary>
  4. ''' The document object represents the Inventor Document,
  5. ''' it allows the you to rapidly access certain values and perform specific tasks
  6. ''' </summary>
  7. Public Class Document
  8.  
  9.     ''' <summary>
  10.     ''' Read-only property that returns the <c>Inventor.Document</c> that is associative with the XT document.
  11.     ''' </summary>
  12.     ''' <example>Document.ReferencedDocument() As Inventor.Document</example>
  13.     Public Overridable ReadOnly Property ReferencedDocument As Inventor.Document
  14.  
  15.  
  16.     ''' <summary>
  17.     ''' Creates a new XT document object
  18.     ''' </summary>
  19.     ''' <param name="InventorDocument">The Inventor document where the new XT document will be associated with.</param>
  20.     ''' <example>Dim XTdocument as New Document(InventorDocument As Inventor.Document)</example>
  21.     Public Sub New(ByVal InventorDocument As Inventor.Document)
  22.  
  23.         ' Store the InventorDocument as ReferencedDocument
  24.         ReferencedDocument = InventorDocument
  25.     End Sub
  26.  
  27.     Public Property Description As String
  28.         Get
  29.  
  30.             ' Set reference to the document property sets
  31.             Dim oPropertySets As PropertySets =
  32.                 ReferencedDocument.PropertySets
  33.  
  34.             ' Set reference to the Design Tracking Property set
  35.             Dim oDesignTrackingPropertySet As PropertySet =
  36.                 oPropertySets.Item("Design Tracking Properties")
  37.  
  38.             ' Set reference to the Description property
  39.             Dim oDescriptionProperty As [Property] =
  40.                 oDesignTrackingPropertySet.Item("Description")
  41.  
  42.             ' Return the description value (as string)
  43.             Description = oDescriptionProperty.Value
  44.  
  45.         End Get
  46.         Set(value As String)
  47.  
  48.             ' Set reference to the document property sets
  49.             Dim oPropertySets As PropertySets =
  50.                 ReferencedDocument.PropertySets
  51.  
  52.             ' Set reference to the Design Tracking Property set
  53.             Dim oDesignTrackingPropertySet As PropertySet =
  54.                 oPropertySets.Item("Design Tracking Properties")
  55.  
  56.             ' Set reference to the Description property
  57.             Dim oDescriptionProperty As [Property] =
  58.                 oDesignTrackingPropertySet.Item("Description")
  59.  
  60.             ' Return the description value (as string)
  61.             oDescriptionProperty.Value = value
  62.  
  63.         End Set
  64.     End Property
  65.  
  66.  
  67.  
  68. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top