08-08-2021
10:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-08-2021
10:23 AM
Oops! One thing I forgot to add:
The above rule needs to be run AFTER this rule:
'Rule by Curtis W. (as-modified) - Open top-leval assembly file and run
'rule to add custom iproperty named "TotalQty" to BOM if it doesn't exist
'activate iLgic run rule automation
Dim addIn As ApplicationAddIn
Dim addIns As ApplicationAddIns = ThisApplication.ApplicationAddIns
Dim iLogicAuto
For Each addIn In addIns
If InStr(addIn.DisplayName, "iLogic") > 0 Then
iLogicAuto = addIn.Automation
Exit For
End If
Next
'open and activate assembly file
Dim openDoc As Document
openDoc = ThisDoc.Document
Dim docFile As Document
If openDoc.DocumentType = kAssemblyDocumentObject Then
For Each docFile In openDoc.AllReferencedDocuments
'****Add your full path and filename****
iLogicAuto.RunExternalRule(docFile, "Add your full path\IPT_CHECK_ADD_IPROP_StkNum_OPEN_PART")
Next
Else
MessageBox.Show("You must have a valid Assembly document open before using this code!", "File Type Mismatch!",MessageBoxButtons.OK,MessageBoxIcon.Exclamation)
End If
Which runs the attached rule.
This rule checks for the existence of the iProperty in a part file, and if it doesn't exist, it adds it.
The above rule transfers the Value of the given iProperty into the new iProperty that this rule created for you.
So you have to run these rules in order.
I haven't gotten around to figuring out how to run them both in this run file.
... 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