Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
chandra.shekar.g
in reply to: navbor

Hi @navbor,

 

Try the following VBA code.

 

Sub Main()
    
    Dim oDef As ComponentDefinition
    Set oDef = ThisApplication.ActiveDocument.ComponentDefinition
    
    Dim baseView As DesignViewRepresentation
    Dim targetView As DesignViewRepresentation

    Set copyDesign = oDef.RepresentationsManager.DesignViewRepresentations.Item("Bottom") ' View1

    Set oView = oDef.RepresentationsManager.DesignViewRepresentations.Item("Left") ' View 3
    
    Call CopyDesignView(copyDesign, oView)
    
End Sub

Sub CopyDesignView(ByVal baseView As DesignViewRepresentation, ByVal targetView As DesignViewRepresentation)

    Dim targetViewName As String
    targetViewName = targetView.Name
    
    Call targetView.Delete
    
    Call baseView.Copy(targetViewName)

End Sub

Please feel free to contact if there is any doubt.

 

If solves problem, click on "Accept as solution" / give a "Kudo".

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network