the best I can do so far is to use the the Event Trigger IproPerties change

then Writte this code
Dim doc = ThisDoc.Document
Dim sDocumentSubType As String = doc.SubType
'Undersøger Document type"
If sDocumentSubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Or sDocumentSubType = "{4D29B490-49B2-11D0-93C3-7E0706000000}" Or sDocumentSubType = "{E60F81E1-49B3-11D0-93C3-7E0706000000}" Or sDocumentSubType = "{28EC8354-9024-440F-A8A2-0E0E55D635B0}" Then ' = "assembly"Then ' = "Sheet Metal"
If iProperties.Value("Custom", "Surface") ="Colour 1" Or iProperties.Value("Custom", "Surface") ="Colour 2" Or iProperties.Value("Custom", "Surface") ="RAL 1028"Or iProperties.Value("Custom", "Surface") ="RAL 5003" Or iProperties.Value("Custom", "Surface") ="RAL 7035"Or iProperties.Value("Custom", "Surface") ="RAL 7037"Or iProperties.Value("Custom", "Surface") ="RAL 9005"Or iProperties.Value("Custom", "Surface") ="RAL 9010" Or iProperties.Value("Custom", "Surface") ="EG-Galv" Or iProperties.Value("Custom", "Surface") ="HDG-Galv"
iLogicVb.RunExternalRule("RefreshColour")
End If
End If
but it still run the code if I do any change to iproperties , but I only want it to run when there has been a chance to iProperties.Value("Custom", "Surface")
I am using inventor 2018 ... can I use iproperties on All Document in inventor 2020 ?... I can only do it local on the fil in 2018 :S