iLogic sub-assembly: View Representation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
i'm having some difficulties with my configurator. I'm pleased in every way about it, speed is good, results are good. Only thing that is not working to my wishes is:
When i have set a sub-assembly to invisible and then turn it back to visible,
Component.Visible("Sub-Assembly:1") = False
Component.Visible("Sub-Assembly:1") = True
The view representation of this sub-assembly is set to master, it looses it setting to "associative default".
So i used this rule to set ALL assemblies to the default view representation. But this raises the following problem. It Also sets views that are not on the Master View to the default view.
In example:
Assembly 1 view = Master
Assembly 2 view = Default
Assembly 3 view = Custom
Result now:
Assembly 1 view = Default
Assembly 2 view = Default
Assembly 3 view = Default
Wanted result:
Assembly 1 view = Default
Assembly 2 view = Default
Assembly 3 view = Custom
Dim doc As AssemblyDocument = ThisDoc.Document Dim oAsmCompDef As ComponentDefinition oAsmCompDef = doc.ComponentDefinition Dim oCompOcc As Inventor.ComponentOccurrence For Each oCompOcc in oAsmCompDef.Occurrences oCompOcc.SetDesignViewRepresentation("Default",, True) On Error Resume Next Next ThisApplication.ActiveView.Fit
So my question is: how to adjust this code to only set sub-assemblies with view=master to view=default?