Discussion Groups

Robot Structural Analysis

Reply
Valued Contributor
Priitl220
Posts: 87
Registered: ‎05-23-2007
Accepted Solution

How to make Excel Vba to use ARSA 2012?

1270 Views, 9 Replies
07-21-2011 01:06 AM

I have ARSA 2011 nad 2012 installed.
I have an excel based vba script that does some stuff in robot.

i added the “Robot Object Model” on the list of available
libraries fromARSA 2012 folder.

When I start my macro it still launches ARSA 2011.

How could I make it to use ARSA 2012 instead?
or choose between them?

I have Win 7 pro 64bit and MS Excel 2007 32bit
ARSA 2011 32bit
ARSA 2011 64bit

From SDK (both versions)

Dim Robot As New RobotApplication

Robot.Project.New I_PT_FRAME_2D

 

Robot.Project.Structure.Nodes.Create 1, 0, 0, 0

....

 

Where could I indicate which version of Robot to use?

____________________________________________
If you find my post useful give me Kudos. Thank you!
If my post solved your problem, accept it as a solution.
Please use plain text.
Product Support
Artur.Kosakowski
Posts: 4,950
Registered: ‎12-17-2010

Re: How to make Excel Vba to use ARSA 2012?

07-21-2011 05:54 AM in reply to: Priitl220

Priit,

 

Try to register the correct version of Robot before launching the script.

 

Start > Programs > Autodesk > ARSAP2012 > Tools > ARSAP Component Registration

 

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
Please use plain text.
Valued Contributor
Priitl220
Posts: 87
Registered: ‎05-23-2007

Re: How to make Excel Vba to use ARSA 2012?

07-22-2011 02:41 AM in reply to: Artur.Kosakowski

Does not work for me.

____________________________________________
If you find my post useful give me Kudos. Thank you!
If my post solved your problem, accept it as a solution.
Please use plain text.
Product Support
Artur.Kosakowski
Posts: 4,950
Registered: ‎12-17-2010

Re: How to make Excel Vba to use ARSA 2012?

07-22-2011 03:00 AM in reply to: Priitl220

Try to unregister Robot 2011 using Start > Run

 

"C:\Program Files\Autodesk\Autodesk Robot Structural Analysis 2011\SYSTEM\EXE\robot.exe" /unregserver

 

and then register Robot 2012

 

"C:\Program Files\Autodesk\Autodesk Robot Structural Analysis 2012\SYSTEM\exe\robot.exe" /regserver

 

Mind to set the correct paths.

 

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
Please use plain text.
Valued Contributor
Priitl220
Posts: 87
Registered: ‎05-23-2007

Re: How to make Excel Vba to use ARSA 2012?

07-24-2011 11:21 PM in reply to: Artur.Kosakowski

I am sad to inform, that this did not work either.

 

I did:

  1. Run "C:\Program Files (x86)\Autodesk\Autodesk Robot Structural Analysis Professional 2011\System\Exe\robot.EXE" /unregserver
  2. Run "C:\Program Files\Autodesk\Autodesk Robot Structural Analysis Professional 2012\System\Exe\robot.EXE" /regserver
  3. Then cheked Excel VBA references . It has "Robot Object Model ver 12.0" checked (loaded from C:\Program Files\Autodesk\Autodesk Robot Structural Analysis Professional 2012\System\Exe\robotom.tlb)
  4. Then I Open C:\Program Files\Autodesk\Autodesk Robot Structural Analysis Professional 2012\SDK\Samples\Silo_generation.xls
  5. And it still starts ARSA Pro 2011

(I do not want to remove 2011 version as i need to use Revit 2011 and Robot 2011 versions also).

 

Win 7 pro 64bit

MS Excel 2007 32bit
ARSA Pro 2011 32bit
ARSA Pro 2012 64bit

 

Should Rxcel 32 bit  be able to communicate with Robot 64bit?

 

____________________________________________
If you find my post useful give me Kudos. Thank you!
If my post solved your problem, accept it as a solution.
Please use plain text.
Product Support
Artur.Kosakowski
Posts: 4,950
Registered: ‎12-17-2010

Re: How to make Excel Vba to use ARSA 2012?

07-25-2011 05:34 AM in reply to: Priitl220

 

Looking at the list of the application I think that the cause of the issue can be the way  WIN7 handles the registry of 32 and 64-bit applications. Please try to unregister both versions of Robot and ten register 2012. Does this help?

If not, try to unistall 32-bit version of Robot 2011 and install 64-bit one instead. I think that for both Robot being the 64-bit applications the registration procedure should work as intended.



Artur Kosakowski
Please use plain text.
Valued Contributor
Priitl220
Posts: 87
Registered: ‎05-23-2007

Re: How to make Excel Vba to use ARSA 2012?

07-25-2011 11:15 PM in reply to: Artur.Kosakowski

Unistalled ARSA pro 2011 32bit

 

I unregistered(/unregserver) and reregistered ( /regserver) ARSA pro 2012 64bit 

 

Added the “Robot Object Model ver12” on the list of available libraries fromARSA 2012 folder.

 

When start sample "Silo generation" (or other) from SDK samples  i get error :Compile Error. Can't find project or library" (attached pic)

 

When I close MS Excel 2007 (32bit) and reopen it has lost the “Robot Object Model ver12” from "references -VBAProject".

 

Any suggestions?

 

____________________________________________
If you find my post useful give me Kudos. Thank you!
If my post solved your problem, accept it as a solution.
Please use plain text.
Product Support
Artur.Kosakowski
Posts: 4,950
Registered: ‎12-17-2010

Re: How to make Excel Vba to use ARSA 2012?

07-26-2011 12:24 AM in reply to: Priitl220

This may be a problem with the  vba cache.

Please try the following:

  1. Remove the reference to the “Robot Object Model ver12”
  2. Run “Generate Silo” (errors)
  3. Add the reference to the “Robot Object Model ver12”
  4. Run “Generate Silo”

 

What is the result?



Artur Kosakowski
Please use plain text.
Valued Contributor
Priitl220
Posts: 87
Registered: ‎05-23-2007

Re: How to make Excel Vba to use ARSA 2012?

07-26-2011 01:10 AM in reply to: Artur.Kosakowski

Steps that solved the issue for me.

  1. Unistall ARSA pro 2011 32bit. no change
  2. Unistall + install ARSA pro 2012 64bit. Started working
  3. installed ARSA pro 2011 64bit. Started using 2011 version again.
  4. 2011 /Unregserver. 2012 /regserver
  5. Run ARSA pro 2012, it prompts for registration of stuff.  Now it works again.

(do not have time to try switching between them).

 

 

____________________________________________
If you find my post useful give me Kudos. Thank you!
If my post solved your problem, accept it as a solution.
Please use plain text.
Product Support
Artur.Kosakowski
Posts: 4,950
Registered: ‎12-17-2010

Re: How to make Excel Vba to use ARSA 2012?

07-26-2011 01:21 AM in reply to: Priitl220

For the switch: mind to run unregserver and regserver as administrator (e.g. you can use Total Commander started as Administrator for this operation or run cmd.exe as administrator).



Artur Kosakowski
Please use plain text.