Message 1 of 2
AllReferencedDocuments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I've struggled for over 2 hours trying to figure out how to access the iProperties in a part file from an assembly file.
So now I'm here inquiring from 'the experts'.
Would someone please educate me on how to access the iProperties using 'AllReferencedDocuments'?
Here's the code:
' Open and activate assembly file
Dim openDoc As Document = ThisDoc.Document
' Get the assembly filename
Dim oAssyFileName As String = ThisDoc.FileName(False)
'MessageBox.Show(oAssyFileName, "oAssyFileName")
' Access all part files in assembly
Dim docFile As Document
If openDoc.DocumentType = kAssemblyDocumentObject Then
For Each docFile In openDoc.AllReferencedDocuments
' Access the part's properties and change the value of 'Authority' iProperty
Next
Else
MessageBox.Show("You must have a valid Assembly document open before running this rule!", _
"Wrong File Type!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End IfThanx!
... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator