- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
@A.Acheson Ah, thank you. I missed that when I was looking through the options of the "SurfaceBody" object.
@A.Acheson You're correct. In the code posted I am working with an assembly. Some of the STP files we get are assemblies. One of the things I wanted to accomplish is to clear the component occurrence names, so they use the default setting. I wasn't sure if I could access the solid body of the part through the component occurrence or if I need to cycle each part and open the document so I can access it. I'm in an exploratory phase and so my approach looks questionable, trust me I'm answering some of my own questions. haha
I was able to access the document through the component occurrence. From the part document I was able to create a part component definition which as shown above gave me access to the clear appearance override. When the program finished I opened one of the parts in the assembly and checked the solid body appearance and it said "As Part". Success!
' Restablish the occurance document as a part document
Dim LocalDoc as Inv.PartDocument = OccDoc
' Get the Component Definition from the Part Doc
Dim LocalDef as Inv.PartComponentDefinition = LocalDoc.ComponentDefinition
' Remove the material and appearances to change solid body appearance
LocalDef.Material.Delete()
LocalDef.ClearAppearanceOverrides()