Discussion Groups

Robot Structural Analysis

Reply
Active Contributor
sorgjee
Posts: 49
Registered: ‎12-11-2011

Re: Command VBA Projection Capture of a view

01-12-2012 12:58 AM in reply to: Rafal.Gaweda

Your EXACT code does not run due to a typo. Even without the typo, and using the rest of the code exactly as you've written, yes, it still crashes.error again.PNG

 

 

 

Regards,

Even

Please use plain text.
Product Support
Posts: 4,445
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

01-12-2012 01:08 AM in reply to: sorgjee

Try this:

- open Macro and VB editor, go to references, uncheck Robot Object Modeler 12, save macro\ excell file, close excell, start excell, load the file, activate Robot Object Modeler 12 in references, run macro.

 

If it does not help try to create screen capture without setting resolution -> what effect?

 

One more: open robot, create such screen capture manually and report me the effect.



Rafal Gaweda
Please use plain text.
Active Contributor
sorgjee
Posts: 49
Registered: ‎12-11-2011

Re: Command VBA Projection Capture of a view

01-12-2012 07:03 AM in reply to: Rafal.Gaweda
  1. Tried this and still get same crash. I tried putting into a new spreadsheet, and still same.
  2. If I delete or comment out the resolution the screen capture works fine.
  3. Creating a large resolution screencapture 'manually' works fine.
Please use plain text.
Product Support
Posts: 4,445
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

01-13-2012 02:11 AM in reply to: sorgjee

What happens if you use this code:

 

Sub screen_capture()

 

Dim mavueRobot As IRobotView3
Set mavueRobot = robapp.Project.ViewMngr.GetView(1)
Dim ScPar As RobotViewScreenCaptureParams
Set ScPar = robapp.CmpntFactory.Create(I_CT_VIEW_SCREEN_CAPTURE_PARAMS)

ScPar.Name = "capture"
ScPar.UpdateType = I_SCUT_COPY_TO_CLIPBOARD
mavueRobot.MakeScreenCapture ScPar
robapp.Project.PrintEngine.AddScToReport "capture"

 

End Sub

 

Still crash ?



Rafal Gaweda
Please use plain text.
Active Contributor
sorgjee
Posts: 49
Registered: ‎12-11-2011

Re: Command VBA Projection Capture of a view

01-16-2012 04:22 AM in reply to: Rafal.Gaweda

Hi Rafal,

 

This code does not crash.

 

The screen capture is not added to the report, but it is i nthe clipboard so can be pasted to a document or image edit programme.

 

Regards,

Even

Please use plain text.
Product Support
Posts: 4,445
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

01-16-2012 07:04 AM in reply to: sorgjee

Do you use 32 or 64 bit Robot?

 

One test more. Please find in zttached zip the C# program which generates 4 screen captures. Please start robot, load any file, run this program, generate screen captures and report whether the error appears or not.



Rafal Gaweda
Please use plain text.
Active Contributor
sorgjee
Posts: 49
Registered: ‎12-11-2011

Re: Command VBA Projection Capture of a view

01-16-2012 07:47 AM in reply to: Rafal.Gaweda

I'm pretty sure it is 64 bit robot.

 

The programme runs fine, and produces 4 screen captures that look to be the correct resolution.

Please use plain text.
Product Support
Posts: 4,445
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

01-16-2012 08:06 AM in reply to: sorgjee

I have not checked such configuration : Office 2007 32 bit and Robot 2012 64 bit. I will check it.

on my side Office 2007 32 bit and Robot 2012 32 bit.



Rafal Gaweda
Please use plain text.
Distinguished Contributor
mateaus
Posts: 117
Registered: ‎10-10-2011

Re: Command VBA Projection Capture of a view

01-19-2012 01:04 AM in reply to: Rafal.Gaweda

Hi I have Robot 2012 64 bit with Excel 2010 and I can't run macro in my new computer. I did this :

 

- open Macro and VB editor, go to references, uncheck Robot Object Modeler 12, save macro\ excell file, close excell, start excell, load the file, activate Robot Object Modeler 12 in references, run macro.

 

but it doesn't work. Do I have to install something else ?

Please use plain text.
Product Support
Posts: 4,445
Registered: ‎04-26-2010

Re: Command VBA Projection Capture of a view

01-19-2012 02:31 AM in reply to: mateaus

In such case unregister ALL ROBOTS you have installed on your computer by command: path_to_robot.exe / unregserver

 

eg:

"C:\Program Files\Autodesk\Autodesk Robot Structural Analysis Professional 2011\System\Exe\robot.EXE" /unRegServer

 

then 

 

register the one you want to use.

 

eg:

"C:\Program Files\Autodesk\Autodesk Robot Structural Analysis Professional 2012\System\Exe\robot.EXE" /RegServer



Rafal Gaweda
Please use plain text.