<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Design View Representations in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7313192#M74352</link>
    <description>&lt;P&gt;Hmmm. Yeah I've tried a couple things as well and can't get it to work either.&lt;/P&gt;</description>
    <pubDate>Sat, 19 Aug 2017 15:45:03 GMT</pubDate>
    <dc:creator>MechMachineMan</dc:creator>
    <dc:date>2017-08-19T15:45:03Z</dc:date>
    <item>
      <title>Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7312785#M74347</link>
      <description>&lt;P&gt;I am busy writing some VBA code to copy the viewing eye, target and upvector from one design view rep to several others. My code is not working and I do not understand why not. Any ideas / suggestions please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub ProcessViews(frmViewCameraCopy As frm_ViewCameraCopy)&lt;BR /&gt;Dim oView As Inventor.DesignViewRepresentation&lt;BR /&gt;Dim activeViewName As String&lt;BR /&gt;&lt;BR /&gt;Dim oBaseView As Inventor.DesignViewRepresentation&lt;BR /&gt;Dim oColTargetViews As New Collection&lt;BR /&gt;&lt;BR /&gt;Dim oCompDef As ComponentDefinition&lt;BR /&gt;Set oCompDef = ThisApplication.ActiveDocument.ComponentDefinition&lt;BR /&gt;For Each oView In _&lt;BR /&gt;oCompDef.RepresentationsManager.DesignViewRepresentations&lt;BR /&gt;If oView.Name = frmViewCameraCopy.BaseViewName Then&lt;BR /&gt;Set oBaseView = oView&lt;BR /&gt;End If&lt;BR /&gt;For Each Item In frmViewCameraCopy.ViewsToProcess&lt;BR /&gt;If Item = oView.Name Then&lt;BR /&gt;oColTargetViews.Add oView&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;BR /&gt;Next&lt;BR /&gt;activeViewName = oCompDef.RepresentationsManager.ActiveDesignViewRepresentation.Name&lt;BR /&gt;&lt;BR /&gt;Dim waslocked As Boolean&lt;BR /&gt;Set oActiveView = ThisApplication.ActiveView&lt;BR /&gt;For Each oView In oColTargetViews&lt;BR /&gt;If oView.Locked Then&lt;BR /&gt;waslocked = True&lt;BR /&gt;oView.Locked = False&lt;BR /&gt;Else&lt;BR /&gt;waslocked = False&lt;BR /&gt;End If&lt;BR /&gt;oView.Activate&lt;BR /&gt;oView.Camera.Target = oBaseView.Camera.Target&lt;BR /&gt;oView.Camera.Eye = oBaseView.Camera.Eye&lt;BR /&gt;oView.Camera.UpVector = oBaseView.Camera.UpVector&lt;BR /&gt;oView.Camera.Apply&lt;BR /&gt;oView.Locked = waslocked&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;oCompDef.RepresentationsManager.DesignViewRepresentations.Item(activeViewName).Activate&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2017 05:36:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7312785#M74347</guid>
      <dc:creator>navbor</dc:creator>
      <dc:date>2017-08-19T05:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7312797#M74348</link>
      <description>&lt;P&gt;You need to actually assign the camera object to a variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Every new call to the camera object grabs a new variable, and would thus likely be why you are seeing issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2017 06:09:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7312797#M74348</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-08-19T06:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7312824#M74349</link>
      <description>&lt;P&gt;Hello Justin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your feedback.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp;that but it makes not difference. It still runs through each view rep and I can see the camera properties change in the watch window as I step through the code, but the&amp;nbsp;view is not updating in the graphics window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the line "&lt;SPAN&gt;oView.Activate" the graphic window changes to the correct view, but, at the line "oCamera.Apply" the viewing eye, target and upvector do not appear to be changing in the graphics window. The view remains in exactly the same as it was before, and then the code steps on to the next design view representation in the collection.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub ProcessViews(frmViewCameraCopy As frm_ViewCameraCopy)&lt;BR /&gt;Dim oView As Inventor.DesignViewRepresentation&lt;BR /&gt;Dim activeViewName As String&lt;BR /&gt;Dim oCamera As Inventor.Camera&lt;BR /&gt;&lt;BR /&gt;Dim oBaseView As Inventor.DesignViewRepresentation&lt;BR /&gt;Dim oColTargetViews As New Collection&lt;BR /&gt;&lt;BR /&gt;Dim oCompDef As ComponentDefinition&lt;BR /&gt;Set oCompDef = ThisApplication.ActiveDocument.ComponentDefinition&lt;BR /&gt;For Each oView In _&lt;BR /&gt;oCompDef.RepresentationsManager.DesignViewRepresentations&lt;BR /&gt;If oView.Name = frmViewCameraCopy.BaseViewName Then&lt;BR /&gt;Set oBaseView = oView&lt;BR /&gt;End If&lt;BR /&gt;For Each Item In frmViewCameraCopy.ViewsToProcess&lt;BR /&gt;If Item = oView.Name Then&lt;BR /&gt;oColTargetViews.Add oView&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;BR /&gt;Next&lt;BR /&gt;activeViewName = oCompDef.RepresentationsManager.ActiveDesignViewRepresentation.Name&lt;BR /&gt;&lt;BR /&gt;Dim waslocked As Boolean&lt;BR /&gt;Set oActiveView = ThisApplication.ActiveView&lt;BR /&gt;For Each oView In oColTargetViews&lt;BR /&gt;If oView.Locked Then&lt;BR /&gt;waslocked = True&lt;BR /&gt;oView.Locked = False&lt;BR /&gt;Else&lt;BR /&gt;waslocked = False&lt;BR /&gt;End If&lt;BR /&gt;oView.Activate&lt;BR /&gt;Set oCamera = oView.Camera&lt;BR /&gt;&lt;BR /&gt;oCamera.Target = oBaseView.Camera.Target&lt;BR /&gt;oCamera.Eye = oBaseView.Camera.Eye&lt;BR /&gt;oCamera.UpVector = oBaseView.Camera.UpVector&lt;BR /&gt;oCamera.Apply&lt;BR /&gt;&lt;BR /&gt;'oView.Camera.Target = oBaseView.Camera.Target&lt;BR /&gt;'oView.Camera.Eye = oBaseView.Camera.Eye&lt;BR /&gt;'oView.Camera.UpVector = oBaseView.Camera.UpVector&lt;BR /&gt;'oView.Camera.Apply&lt;BR /&gt;&lt;BR /&gt;oView.Locked = waslocked&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;oCompDef.RepresentationsManager.DesignViewRepresentations.Item(activeViewName).Activate&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2017 06:53:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7312824#M74349</guid>
      <dc:creator>navbor</dc:creator>
      <dc:date>2017-08-19T06:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7313192#M74352</link>
      <description>&lt;P&gt;Hmmm. Yeah I've tried a couple things as well and can't get it to work either.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2017 15:45:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7313192#M74352</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-08-19T15:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7315386#M74359</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/582380"&gt;@navbor&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the following VBA code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Set oCamera = oView.Camera

oCamera.Target = oBaseView.Camera.Target.Copy&lt;BR /&gt;oCamera.Eye = oBaseView.Camera.Eye.Copy
oCamera.UpVector = oBaseView.Camera.UpVector.Copy
Call oCamera.ApplyWithoutTransition&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 09:41:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7315386#M74359</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-08-21T09:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7316072#M74363</link>
      <description>&lt;P&gt;Hello Chandra,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much for the advice, but the results are the same as before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to explain as best I can.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 10 design view representations in an assembly (iam file). I activate each &lt;SPAN&gt;design view rep, and orientate the view randomly, and zoom in / out to various heights so that each of the 10 views appears different. There will&amp;nbsp;be certain items visible / not visible, and certain items colored differently between the views also.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I run my VBA macro. (screen shots attached). After I run the macro, I want all the views that I selected as target views to look exactly like the base view, but I only want the view orientation (upvector), zoom height(camera.eye) and view (camera.target) to be the same as the base view. In other words and colors or part visibility settings must be maintained and not copied from the base view. This is very handy for screen capturing for presentation purposes when you want to represent different parts in the assembly in a specific sequence.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Right now the code does not do this (even with the changes you suggested). If you have any other suggestions, i would be happy to try them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub ProcessViews(frmViewCameraCopy As frm_ViewCameraCopy)&lt;BR /&gt;Dim oView As Inventor.DesignViewRepresentation&lt;BR /&gt;Dim activeViewName As String&lt;BR /&gt;Dim oCamera As Inventor.Camera&lt;BR /&gt;Dim oBaseView As Inventor.DesignViewRepresentation&lt;BR /&gt;Dim oColTargetViews As New Collection&lt;BR /&gt;Dim oCompDef As ComponentDefinition&lt;BR /&gt;Dim width, height As Double&lt;BR /&gt;Dim waslocked As Boolean&lt;BR /&gt;Dim viewInfo As String&lt;BR /&gt;Dim cameraHeight As Double&lt;BR /&gt;Dim cameraWidth As Double&lt;BR /&gt;Dim oTG As Inventor.TransientGeometry&lt;BR /&gt;Set oTG = ThisApplication.TransientGeometry&lt;BR /&gt;Dim upVector As Inventor.UnitVector&lt;BR /&gt;Dim cameraPosition As Inventor.Point&lt;BR /&gt;Dim targetPosition As Inventor.Point&lt;BR /&gt;&lt;BR /&gt;Set oCompDef = ThisApplication.ActiveDocument.ComponentDefinition&lt;BR /&gt;&lt;BR /&gt;For Each oView In _&lt;BR /&gt;oCompDef.RepresentationsManager.DesignViewRepresentations&lt;BR /&gt;If oView.Name = frmViewCameraCopy.BaseViewName Then&lt;BR /&gt;Set oBaseView = oView&lt;BR /&gt;End If&lt;BR /&gt;For Each Item In frmViewCameraCopy.ViewsToProcess&lt;BR /&gt;If Item = oView.Name Then&lt;BR /&gt;oColTargetViews.Add oView&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;cameraHeight = GetCameraHeight(oBaseView.DesignViewInfo)&lt;BR /&gt;cameraWidth = GetCameraWidth(oBaseView.DesignViewInfo)&lt;BR /&gt;Set upVector = oTG.CreateUnitVector(GetUpVectorX(oBaseView.DesignViewInfo), GetUpVectorY(oBaseView.DesignViewInfo), GetUpVectorZ(oBaseView.DesignViewInfo))&lt;BR /&gt;Set cameraPosition = oTG.CreatePoint(GetCameraPointX(oBaseView.DesignViewInfo), GetCameraPointY(oBaseView.DesignViewInfo), GetCameraPointZ(oBaseView.DesignViewInfo))&lt;BR /&gt;Set targetPosition = oTG.CreatePoint(GetTargetPointX(oBaseView.DesignViewInfo), GetTargetPointY(oBaseView.DesignViewInfo), GetTargetPointZ(oBaseView.DesignViewInfo))&lt;BR /&gt;&lt;BR /&gt;activeViewName = oCompDef.RepresentationsManager.ActiveDesignViewRepresentation.Name&lt;BR /&gt;&lt;BR /&gt;Set oActiveView = ThisApplication.ActiveView&lt;BR /&gt;&lt;BR /&gt;For Each oView In oColTargetViews&lt;BR /&gt;ThisApplication.ActiveView.Fit&lt;BR /&gt;If oView.Locked Then&lt;BR /&gt;waslocked = True&lt;BR /&gt;oView.Locked = False&lt;BR /&gt;Else&lt;BR /&gt;waslocked = False&lt;BR /&gt;End If&lt;BR /&gt;oView.Activate&lt;BR /&gt;'Debug.Print oView.DesignViewInfo&lt;BR /&gt;Set oCamera = ThisApplication.ActiveView.Camera&lt;BR /&gt;&lt;BR /&gt;oCamera.Target = oBaseView.Camera.Target.Copy&lt;BR /&gt;oCamera.Eye = oBaseView.Camera.Eye.Copy&lt;BR /&gt;oCamera.upVector = oBaseView.Camera.upVector.Copy&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;oCamera.Apply&lt;BR /&gt;&lt;BR /&gt;Application.Wait Now + #12:00:02 AM#&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;oView.Locked = waslocked&lt;BR /&gt;Next&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 14:00:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7316072#M74363</guid>
      <dc:creator>navbor</dc:creator>
      <dc:date>2017-08-21T14:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7317943#M74372</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/582380"&gt;@navbor&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the following VBA code to copy one design view to another design view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
    
    Dim oDef As ComponentDefinition
    Set oDef = ThisApplication.ActiveDocument.ComponentDefinition
    
    Dim copyDesign As DesignViewRepresentation
    Dim oView As DesignViewRepresentation
    Dim eye, target As Point
    Dim upVector As UnitVector

    Set copyDesign = oDef.RepresentationsManager.DesignViewRepresentations.Item("BaseView") ' View1
    Call copyDesign.Activate

    Dim currentView As View
    Set currentView = ThisApplication.ActiveView

    Dim currentCamera As Camera
    Set currentCamera = currentView.Camera

    Dim tg As TransientGeometry
    Set tg = ThisApplication.TransientGeometry
    
    Set eye = tg.CreatePoint(currentCamera.eye.X, currentCamera.eye.Y, currentCamera.eye.Z)
    Set target = tg.CreatePoint(currentCamera.target.X, currentCamera.target.Y, currentCamera.target.Z)
    Set upVector = tg.CreateUnitVector(currentCamera.upVector.X, currentCamera.upVector.Y, currentCamera.upVector.Z)

    Set oView = oDef.RepresentationsManager.DesignViewRepresentations.Item("TargetView") ' View 3
    Call oView.Activate

    Dim docCamera As Camera
    Dim docView As View
    Set docView = ThisApplication.ActiveView

    Set docCamera = docView.Camera

    docCamera.eye = eye
    docCamera.upVector = upVector
    docCamera.target = target

    'Call docCamera.Fit

    Call docCamera.Apply

    Call docView.Update
    
    oView.AutoSaveCamera = True
    
End Sub&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 06:30:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7317943#M74372</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-08-22T06:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7319193#M74385</link>
      <description>&lt;P&gt;Hell Chandra,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this code, but the results are the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have any other suggestions I would be very happy to try them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see attached.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 14:54:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7319193#M74385</guid>
      <dc:creator>navbor</dc:creator>
      <dc:date>2017-08-22T14:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7319290#M74386</link>
      <description>&lt;P&gt;At this point, I'm almost thinking it's a bug with the DVR camera; would be worth some extra testing.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 15:28:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7319290#M74386</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-08-22T15:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7324621#M74415</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/582380"&gt;@navbor&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did some modifications to the code. try the following VBA code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
    
    Dim oDef As ComponentDefinition
    Set oDef = ThisApplication.ActiveDocument.ComponentDefinition
    
    Dim copyDesign As DesignViewRepresentation
    Dim oView As DesignViewRepresentation
    Dim eye, target As Point
    Dim upVector As UnitVector

    Set copyDesign = oDef.RepresentationsManager.DesignViewRepresentations.Item("Bottom")
    Call copyDesign.Activate

    Dim currentView As View
    Set currentView = ThisApplication.ActiveView

    Dim currentCamera As Camera
    Set currentCamera = currentView.Camera

    Dim tg As TransientGeometry
    Set tg = ThisApplication.TransientGeometry
    
    Set eye = tg.CreatePoint(currentCamera.eye.X, currentCamera.eye.Y, currentCamera.eye.Z)
    Set target = tg.CreatePoint(currentCamera.target.X, currentCamera.target.Y, currentCamera.target.Z)
    Set upVector = tg.CreateUnitVector(currentCamera.upVector.X, currentCamera.upVector.Y, currentCamera.upVector.Z)
    
    Dim width As Double
    Dim height As Double
    Call currentCamera.GetExtents(width, height)
    Call currentCamera.Fit
    
    Dim widthfit As Double
    Dim heightfit As Double
    Call currentCamera.GetExtents(widthfit, heightfit)

    Call currentCamera.SetExtents(width, height)
    
    Dim widthratio As Double
    Dim heightratio As Double

    widthratio = width / widthfit
    heightratio = height / heightfit

    Set oView = oDef.RepresentationsManager.DesignViewRepresentations.Item("Left")
    Call oView.Activate

    Dim docCamera As Camera
    Dim docView As View
    Set docView = ThisApplication.ActiveView

    Set docCamera = docView.Camera

    docCamera.eye = eye
    docCamera.upVector = upVector
    docCamera.target = target

    Call docCamera.Fit
    
    Dim Docwidth As Double
    Dim Docheight As Double
    Call docCamera.GetExtents(Docwidth, Docheight)
    Call docCamera.SetExtents(Docwidth * widthratio, Docheight * heightratio)

    Call docCamera.Apply

    Call docView.Update
    
End Sub
&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 05:57:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7324621#M74415</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-08-24T05:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7324985#M74418</link>
      <description>&lt;P&gt;Hello Chandra,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly, thanks very much for all your efforts trying to help with resolving this. I really appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sadly however, even the latest code listed above does not improve the situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is very much like the result from the previous test and that is; the view is correctly orientated, but not in the correct (i.e. identical position on screen).&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 08:39:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7324985#M74418</guid>
      <dc:creator>navbor</dc:creator>
      <dc:date>2017-08-24T08:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7332646#M74484</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/582380"&gt;@navbor&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the following VBA code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 09:37:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7332646#M74484</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-08-28T09:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7335931#M74525</link>
      <description>&lt;P&gt;Hello Chandra,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works, but sadly it is not a solution that will work for me. I have certain components in the target view that are colored differently, and in some cases hidden or transparent. Using the delete and copy (latest) method causes me to lose all the color and visibility settings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To me this looks like a bug, or perhaps a limitation with VBA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much for all your help.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 13:41:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7335931#M74525</guid>
      <dc:creator>navbor</dc:creator>
      <dc:date>2017-08-29T13:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7336078#M74529</link>
      <description>&lt;P&gt;This topic has been escalated, so hopefully the software team will be able to look at it and correct it if it is indeed a bug. For now, sadly, I think you will have to make do with a workaround.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 14:17:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7336078#M74529</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-08-29T14:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Design View Representations</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7341007#M74593</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/582380"&gt;@navbor&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did some more modifications to the code. Try the following VBA code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
    
    Dim oDef As ComponentDefinition
    Set oDef = ThisApplication.ActiveDocument.ComponentDefinition
    
    Dim copyDesign As DesignViewRepresentation
    Dim oView As DesignViewRepresentation
    Dim Eye As Point, Target As Point
    Dim UpVector As UnitVector

    Set copyDesign = oDef.RepresentationsManager.DesignViewRepresentations.Item("Bottom")
    Call copyDesign.Activate
    
    Dim currentView As View
    Set currentView = ThisApplication.ActiveView

    Dim currentCamera As camera
    Set currentCamera = currentView.camera
    
    Set Eye = currentCamera.Eye
    Set Target = currentCamera.Target
    Set UpVector = currentCamera.UpVector
    
    Dim Width As Double
    Dim Height As Double
    Call currentCamera.GetExtents(Width, Height)

    Set oView = oDef.RepresentationsManager.DesignViewRepresentations.Item("Left")
    Call oView.Activate

    Dim docCamera As camera
    Dim docView As View
    Set docView = ThisApplication.ActiveView

    Set docCamera = docView.camera
    SetCameraData docCamera, Eye, Target, UpVector, Width, Height
    SetCameraData docCamera, Eye, Target, UpVector, Width, Height

    ' save the camera for the design view
    oView.SaveCurrentCamera
    Call docView.Update

End Sub

Sub SetCameraData(oCamera As camera, oEye As Point, oTarget As Point, oUpVector As UnitVector, dWidth As Double, dHeight As Double)
    &lt;BR /&gt;    oCamera.UpVector = oUpVector
    oCamera.Eye = oEye
    oCamera.Target = oTarget
    oCamera.SetExtents dWidth, dHeight
    oCamera.Apply
&lt;BR /&gt;End Sub

&lt;/PRE&gt;
&lt;P&gt;In the above code, &lt;STRONG&gt;"SetCameraData"&lt;/STRONG&gt; function is used to twice. Because, if it called once. Still there is a bit tolerance between Design View Representations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is observed in the result of previous VBA code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 04:46:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/design-view-representations/m-p/7341007#M74593</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-08-31T04:46:09Z</dc:date>
    </item>
  </channel>
</rss>

