- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
(iLogic) Setting 'Design View Representation' for a specific subassembly
Very simple problem I'd say, but can't figure out how to do it:
I Want to control the 'Design View Representation' (named CD Draadmodel) of a specific subassembly (named 00001 - Main).
Thought something like the code below should work, but I'm not much of a programmer, and alas it doesn't work.
ThisApplication.ActiveDocument.ComponentDefinition("00001 - Main").RepresentationsManager.DesignViewRepresentation("CW Draadmodel").ActivateDoes somebody know how to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Try this. Pay attention to the :1 after your assembly name as it needs to be exactly the occurrence name as it shows up in the browser.
Dim ocomp As ComponentOccurrence
For Each ocomp In ThisApplication.ActiveDocument.ComponentDefinition.Occurrences
If ocomp.Name = "00001 - Main:1" Then
ocomp.SetDesignViewRepresentation ("CW Draadmodel", True)
Exit For
End If
Next ocomp
Cheers
Bob

Bob Van der Donck
Principal UX designer DMG group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Component.InventorComponent("Sub Assembly Name").SetDesignViewRepresentation("View 1",,True)
Just run this rule in parent assembly where you want to set specific design view representation of sub-assembly
Sub Assembly Name = name appearing in browser for your subassembly
View 1 = name of your desired view representation in that sub assembly
In attached image, Sub assembly name is "Chamber Insulation Riveted" and desired view representation is "Default". It's set by this one line rule only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What will be the code for changing the Design View Representation of the Assembly itself, say View1 to View2, instead of the subassembly.
And also my other rules will work on the design representation. i,e. if I'm in View 1 and running a logic parametric rule to change the size, which has the suppression of some components, whether the same will reflect in View 2 which is not activated.
if not, what should I do, so that it's updated in both the view Representation