CreateHighlightSet on sub-assembly geometry

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
Just looking for a pointer on creating a highlight set on a component occurrence within a sub-assembly.
What I am doing is getting the entities attached to a constraint in the sub assembly and trying to highlight the geometry to show the user which faces etc. are involved in the constraint.
I have tried several different ways of creating a proxy object but it throws an error every time. I had thought I was creating the proxy at the wrong level but I've tried calling the 'CreateGeometryProxy' method on the main assembly, sub assembly, leaf occurrence but nothing seems to work.
Please advise on the correct procedure given the model below. I would like to highlight face A and B while in the Main Assembly
Main Assembly
Sub Assembly
Leaf Occurrence One
Face A
Leaf Occurrence Two
Face B
oHighlightSet = InventorApplication.ActiveDocument.CreateHighlightSet
oHighlightSet.Color = InventorApplication.TransientObjects.CreateColor(255, 0, 0)
Dim oTemp As Object
Dim oCompTemp As ComponentOccurrence
Dim oGeomTemp As Object
oGeomTemp = oConstraint.EntityOne
oGeomTemp = oGeomTemp.NativeObject
oCompTemp = oConstraint.Parent
oCompTemp.CreateGeometryProxy(oGeomTemp, oTemp)
oHighlightSet.AddItem(oTemp)
oCompTemp = oConstraint.Parent
oCompTemp.CreateGeometryProxy(oGeomTemp, oTemp)
oHighlightSet.AddItem(oTemp)
Thanks in advance
Phil