03-21-2019
01:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-21-2019
01:51 AM
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
