Hi, with this VBA code you could change the design view representation, through the item number (the number highlighted in red)
Sub ChangeDVR()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
Dim oDef As ComponentDefinition
Set oDef = oDoc.ComponentDefinition
oDef.RepresentationsManager.DesignViewRepresentations(2).Activate
End Sub
You could also use an ilogic rule as I will show you below
Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim oDef As AssemblyComponentDefinition = oDoc.ComponentDefinition
Dim oList As New ArrayList
For Each oDVR As Inventor.DesignViewRepresentation In oDef.RepresentationsManager.DesignViewRepresentations
oList.Add(oDVR.Name)
Next
Dim oDVRName As String = InputListBox("Select DesignViewRep", oList, oList(0), "Change DVR", "Available Selections")
On Error Resume Next
oDef.RepresentationsManager.DesignViewRepresentations(oDVRName).Activate
I hope this helps with your problem. Cheers!
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn