Autodesk Robot Structural Analysis
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I have a problem with my macro. The command of projection in 3D doesn't work. My view stay in XZ plane.
robapp.Window.Activate
Set mavueRobot = robapp.Project.ViewMngr.CreateView(1)
mavueRobot.Projection = I_VP_3DXYZ
mavueRobot.Visible = True
mavueRobot.Redraw (True)
I want also make a capture of my model with diagram of results. Have you an example of code for it ?
I would like to get for final result the exemple in attachment.
Solved! Go to Solution.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Seems like one line is missing:
mavueRobot.Projection = I_VP_3DXYZ
robapp.Project.ViewMngr.Refresh
mavueRobot.Visible = True
If you find your post answered press the Accept as Solution button please. This will help other users to find solutions much faster. Thank you.

Artur Kosakowski
Support Specialist
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Ok but it's not working.
See my attachment
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
It seems like you missed the attachment.

Artur Kosakowski
Support Specialist
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Attachments
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi
Take a look at attached movie

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi
It seems it is related to your computer graphics card (and maybe also 64 bit Robot).
On one of our computers I have the same bahavior.Switching between views (several times), refreshing them manualy etc refreshes view on this viewport.

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The excel file has been created 5 years ago, I don't think this is a problem related to 64 bit Robot.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
mateaus wrote:
The excel file has been created 5 years ago,
No, it was created 09.2001 :-)

Rafal Gaweda
Product Support
Autodesk, Inc.
Re: Command VBA Projection Capture of a view
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Update to "your" macro to set map display on view and to make screen capture
Read comments in code below
Public Sub CreeVueRM()
' définition d'une vue
robapp.Interactive = True
robapp.Visible = True
robapp.Window.Activate
robapp.Project.CalcEngine.Calculate ' calculate model
Dim mavueRobot As IRobotView3 ' this is important to set IRobotView3 if you want to make screen capture of this view
Set mavueRobot = robapp.Project.ViewMngr.GetView(1) ' it seems CreateView makes this strange affect, use GetView instead
mavueRobot.Selection.Get(I_OT_CASE).FromText ("3") ' selecting case for results display
mavueRobot.Redraw (True)
mavueRobot.Projection = I_VP_3DXYZ
' displaying map
mavueRobot.ParamsFeMap.CurrentResult = I_VFMRT_GLOBAL_DISPLACEMENT_Z
mavueRobot.Visible = True
mavueRobot.Redraw (True)
robapp.Project.ViewMngr.Refresh
' making screen capture
Dim ScPar As RobotViewScreenCaptureParams
Set ScPar = robapp.CmpntFactory.Create(I_CT_VIEW_SCREEN_CAPTUR
ScPar.Name = "My screen capture"
ScPar.UpdateType = I_SCUT_UPDATED_UPON_PRINTING
mavueRobot.MakeScreenCapture ScPar
End Sub

Rafal Gaweda
Product Support
Autodesk, Inc.


