In the Format Text dialog you can select the Properties of the Model. I need to find out programmatically which referenced document these iProperties are coming from. I tried using the last ReferencedDocument of the drawing but this is not always the right document. Is there a way to determine the document providing these properties for the text?
The document that supplies the iProperties in the Format Text dialog is the document that is referenced by the first view on the sheet. Here is an example that shows how to get this document using the views ReferencedDocumentDescriptor:
If m_inventorApp.ActiveDocument.DocumentType <>
Dim oDrawDoc As DrawingDocument =
Dim oView As DrawingView
oView = oDrawDoc.ActiveSheet.DrawingViews(1)
Dim oRefDocDesc2 As DocumentDescriptor =