Viewing iProperties but not using its main source

Viewing iProperties but not using its main source

Anonymous
Not applicable
240 Views
3 Replies
Message 1 of 4

Viewing iProperties but not using its main source

Anonymous
Not applicable
I’m looking at an IDW with iproperties, the IDW has a description that is coming from the IPT’s iproperties. How can I see the description in the IDW using the API?
0 Likes
241 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Do you want the description that's defined for the IDW? That is, when you
run the iProperties command for the drawing, the text you see for the
description in the Project tab? Or are you talking about the text that's
being used for the description in the title block?
--
Brian Ekins
Autodesk Inventor API
0 Likes
Message 3 of 4

Anonymous
Not applicable
I’m looking for the text that’s being display in the title block (in this case the description).
That text is being pull from the IPT or IAM and displayed in the IDW
0 Likes
Message 4 of 4

Anonymous
Not applicable
When you display the model properties in the title block Inventor uses the
iProperties in the document associated with the first view placed on that
sheet. You need to get access to the document associated with that view and
query the iProperties through it. Here's an example.

Public Sub GetViewiProperties()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument

' Get the first view on the sheet.
Dim oFirstView As DrawingView
Set oFirstView = oDoc.ActiveSheet.DrawingViews.Item(1)

' Get the document referenced by the view.
Dim oRefDoc As Document
Set oRefDoc = oFirstView.ReferencedDocumentDescriptor.ReferencedDocument

' Get the description property.
Dim oProp As Property
Set oProp = oRefDoc.PropertySets.Item("Design Tracking
Properties").Item("Description")

MsgBox "The description is: " & oProp.Value
End Sub

--
Brian Ekins
Autodesk Inventor API
0 Likes