Hi @alan.wedge. Do you just want to monitor for when certain specific iProperties in your main assembly change, then copy the value of that changed iProperty down to all part documents in every lower level of the assembly? Likely the most efficient way to do that would be to create a custom event handler code that is designed to only react to those specific property changes. But if you want to keep it simple, we can use the "iProperty Change" event in the Event Triggers dialog and an iLogic rule, as @Ralf_Krieg suggested. If you are going to be making tons of iProperty changes in your main assembly, but most of them are not the ones that need to be copied down, and this assembly is heavily used, I would suggest going the custom event handler route, to limit all that processing to a minimum, so it won't bog Inventor down, but otherwise the simpler route should be just fine.
Anyways, here is an alternate iLogic rule you may like to use for this process. Within the first part of the rule is where you would specify the names of the iProperties you want to monitor for changes. Then when the 'iProperty Change' event happens, this rule will run, then check to see if any of these specified properties have been 'dirtied' (changed since the file was opened or last saved). If any of those properties have been 'dirtied' they will be copied down to every part document, in every level of the assembly. Since that 'iProperty Change' event can be triggered by 'any' iProperty change, I'm thinking that by checking the 'Dirty' status, we might help reduce unnecessary processing.
Here is the code I wrote for a process like that:
Sub Main
Dim oADoc As AssemblyDocument = ThisDoc.Document
'specify which Assembly iProperties to monitor for changes
'then when they change, their values will be pushed to the parts
Dim oPropNames As New List(Of String)
oPropNames.Add("Keywords") '<<<< CHANGE THIS AS NEEDED >>>>
oPropNames.Add("Comments") '<<<< CHANGE THIS AS NEEDED >>>>
oPropNames.Add("Category") '<<<< CHANGE THIS AS NEEDED >>>>
oPropNames.Add("Project") '<<<< CHANGE THIS AS NEEDED >>>>
'Dirty = created/edited/modified since open or last save
For Each oSet As PropertySet In oADoc.PropertySets
If Not oSet.Dirty Then Continue For
For Each oProp As Inventor.Property In oSet
If Not oProp.Dirty Then Continue For
For Each oName In oPropNames
If oProp.Name = oName Then
PushToParts(oADoc.AllReferencedDocuments, oProp)
End If
Next
Next
Next
'MsgBox("Finished.",,"")
End Sub
Sub PushToParts(oRefDocs As DocumentsEnumerator, oProp As Inventor.Property)
Dim oParts As List(Of PartDocument) = oRefDocs.Cast(Of Inventor.Document).Where(Function(d) _
d.DocumentType = DocumentTypeEnum.kPartDocumentObject).Cast(Of PartDocument).ToList
For Each oPDoc In oParts
Try
oPDoc.PropertySets.Item(oProp.Parent.Name).Item(oProp.Name).Value = oProp.Value
Catch
'what to do if that fails (nothing right now)
End Try
Next
End Sub
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
If you want and have time, I would appreciate your Vote(s) for My IDEAS 💡 or you can Explore My CONTRIBUTIONS
Wesley Crihfield

(Not an Autodesk Employee)