01-23-2020
08:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-23-2020
08:53 AM
Hi @Anonymous
It occurred to me after reading your second reply, that if you're just wanting to set the face to a known local color, then you can use a much simpler rule similar to what mcgyvr suggested, here's and example of that too.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
'set this rule to watch this parameter
oTrigger = FaceIsColored
Dim oDoc As PartDocument
oDoc = ThisApplication.ActiveDocument
Dim oEntities As Object
oEntities = iLogicVb.Automation.GetNamedEntities(oDoc)
'get the named face
Dim oFace As Face
oFace = oEntities.FindEntity("Target Face")
'set the color if paramter is true
If Parameter("FaceIsColored") = True Then
oFace.Appearance = oDoc.Assets.Item("Dark Green")
Else
oFace.Appearance = oDoc.ActiveAppearance
End If