Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

@Darkforce_the_ilogic_guy ,

 

Hoping that below iLogic code may be useful to activate active view. Before adding views, collect the active name view and then activate it after your task.

Dim doc As AssemblyDocument
 doc = ThisApplication.ActiveDocument
 ' get AssemblyComponentDefinition
 Dim AssemblyDef As AssemblyComponentDefinition
 AssemblyDef = doc.ComponentDefinition
 ' get Manager of Representations
 Dim dViewRepMgr As RepresentationsManager
  dViewRepMgr = AssemblyDef.RepresentationsManager

Dim dViewRep As DesignViewRepresentation
 dViewRep = dViewRepMgr.ActiveDesignViewRepresentation
 
Dim oName As String 
oName = dViewRep.Name 

' get the first Representation view
  dViewRep = dViewRepMgr.DesignViewRepresentations.Item(oName)
 ' activate the first view
 dViewRep.Activate

Thanks and regards,

 

 


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network