08-31-2016
07:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-31-2016
07:25 AM
Thanks for that info MegaJerk, that is exactly what I needed. Below is the code I came up with to check if a part/assembly inside of a drawing has an external rule setup to trigger.
Dim docFile As Document
If ThisDoc.ModelDocument IsNot Nothing Then
docFile = ThisDoc.ModelDocument
Else
Return
End If
'Check if part has iLogic rule named Material, if not this will update Matrl iProp even if Matrl already exists
Dim MatFound = False
Dim iLogicE As propertyset
iLogicE = docFile.PropertySets.Item("{2C540830-0723-455E-A8E2-891722EB4C3E}")
For i As Integer = 1 To ilogicE.count
If (InStr(ilogicE.item(i).Value,"Material_Part")) Or (InStr(iLogicE.item(i).Value,"Material_Assembly")) Then MatFound = True
Next
MsgBox("Does part/assembly have a matching external iLogic rule. " & MatFound)