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
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 Rafal,
Using the below command with Robot 12 and Excel 2007 causes excel to crash. Is this a known issue?
ScPar.Resolution = I_VSCR_4096
Regards,
Even
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
Using the below command with Robot 12 and Excel 2007 causes excel to crash. Is this a known issue?
ScPar.Resolution = I_VSCR_4096
It should work.
Public robapp As RobotApplication
Private Sub CommandButton1_Click()
Set robapp = New RobotApplication
Dim viewRobot As IRobotView3 ' this is important to set IRobotView3 if you want to make screen capture of this view
Set viewRobot = robapp.Project.ViewMngr.GetView(1)
viewRobot.Projection = I_VP_3DXYZ
viewRobot.Redraw (True)
robapp.Project.ViewMngr.Refresh
Call screen_capture
End Sub
Sub screen_capture()
Dim viewRobot As IRobotView3
Set viewRobot = robapp.Project.ViewMngr.GetView(1)
Dim ScPar As RobotViewScreenCaptureParams
Set ScPar = robapp.CmpntFactory.Create(I_CT_VIEW_SCREEN_CAPTUR
ScPar.Name = "capture"
ScPar.UpdateType = I_SCUT_CURRENT_VIEW
ScPar.Resolution = I_VSCR_4096
viewRobot.MakeScreenCapture ScPar
robapp.Project.PrintEngine.AddScToReport "capture"
End Sub
Try this (last post in this thread):

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 Rafal,
The macro you provided runs, but as soon as it comes to the Resolution command it causes excel to crash.
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
Have you tried this ?:
Try this (last post in this thread):

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
Yes, makes no difference. Still crashing the exact same way.
Regards,
Even
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
What happens if you use diffeent screen capture resolution ?
ScPar.Resolution = I_VSCR_2048
or
ScPar.Resolution = I_VSCR_3072

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
Same crash for excel.
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
What is sisplayed after running this macro in Excell cells:
Private Sub Ver()
Dim robapp As RobotApplication
Set robapp = New RobotApplication
Cells(1, 1) = robapp.Version
Cells(2, 1) = robapp.ProgramVersion
End Sub

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
It comes out as:
| 12 |
| 25.0.3.3833 |
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
Please try my EXACT code - published a few posts earlier.
Do not modify it.
I can see in your screen capture that in your screen_capture sub you create again robapp (which is already created by main function in my code)

Rafal Gaweda
Product Support
Autodesk, Inc.


