- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Rule in drawing document: Using the following
oModelDoc = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
I retrieve model document properties in to the drawing document and vice versa.
Recently, with the same rule running in drawing, I also need to retrieve such data from a part or assembly of a non-model-document.
Path and file name of this other document is known. Please see below! Can I retrieve the description (for example) of this other document. I tried my best without success. Request help. Thank you.
Sub Main() oModelDoc = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName) oDoc = ThisDrawing.ModelDocument Dim invCustomProps As Inventor.PropertySet invCustomProps = oDoc.PropertySets.Item("User Defined Properties") Dim invCustomProp As Inventor.Property Description_Model = iProperties.Value(oModelDoc, "Project", "Description") MessageBox.Show("Model_Desn: " & Description_Model, "Title") oDoc_Other = "C:\$WF_DHAMAG\Projects\DHAMAG_SDAI\ADSI-P001-ARF33\P001-A0001.iam" Description_Other = ????????????????? End Sub
Drawing (for Example): C:\$WF_DHAMAG\Projects\DHAMAG_SDAI\ADSI-P001-ARF33\P001-A0001.iam
Model Document (for example): C:\$WF_DHAMAG\Projects\DHAMAG_SDAI\ADSI-P001-ARF33\P001-sa1001.idw
Other Document (Example): C:\$WF_DHAMAG\Projects\DHAMAG_SDAI\ADSI-P001-ARF33\P001-A0001.iam
Solved! Go to Solution.