iLogic sub-assembly: View Representation

iLogic sub-assembly: View Representation

Anonymous
Not applicable
1,673 Views
4 Replies
Message 1 of 5

iLogic sub-assembly: View Representation

Anonymous
Not applicable

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?

1,674 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

I think (and i could very well be wrong) you need to use a custom level of detail in order to turn visibility of parts on and off in a configurator.. worth a try and its easily done.

0 Likes
Message 3 of 5

Anonymous
Not applicable

Not sure that is correct. for the use of sub-assemblies that have parts going visible and in-visible i'm not a big fan of level of detail for parts on and off? could be wrong..

 

i just hate getting the message the assembly cannot be saved because it's on another level of detail then...

0 Likes
Message 4 of 5

rikard.nilsson
Collaborator
Collaborator

Hi,

 

How about usning ActiveDesignViewRepresentation to check wich one that is active before you change it?

 

/Rikard

0 Likes
Message 5 of 5

RoyWickrama_RWEI
Advisor
Advisor
I could do my work with one line of your code that I was seeking for.
(oCompOcc.SetDesignViewRepresentation("Default",, True)
0 Likes