• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Robot Structural Analysis

    Reply
    Active Contributor
    Posts: 34
    Registered: ‎12-07-2012
    Accepted Solution

    Robot API - open and close project issues

    132 Views, 3 Replies
    01-01-2013 03:32 AM

    Hi,

    First question : I want to close a Robot project without saving using API code 'Robot.Project.Close', and without closing RSA application.

    But nothing happens. I would like to go back to the starting window (the grey one with 'Projects' And 'New Project' Option). But the project is still opened and still appears in the Robot window. How can I do that ? Is there a kind of 'refresh' script to add ?

     

     

    Second question : I open RSA through API using 

     

    Dim Robot As New RobotApplication
    Robot.Visible = True
    Robot.Window.Activate

     

    I would like the RSA window to come to the front, above the window form which the API script is launched (Rhino&Grasshopper in my case - it could be Excel). It is not the case with my script, RSA just appears in the task bar, but does not become visible. How can I do that ?

     

     

    Thanks

     

    Guillaume

     

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

    Re: Robot API - open and close project issues

    01-02-2013 01:12 AM in reply to: guillaumeniel

    First question : I want to close a Robot project without saving using API code 'Robot.Project.Close', and without closing RSA application.

    But nothing happens. I would like to go back to the starting window (the grey one with 'Projects' And 'New Project' Option). But the project is still opened and still appears in the Robot window. How can I do that ? Is there a kind of 'refresh' script to add ?

     

    IN fact robot can not open moer than 1 project so Close option does not work as you think.

    Close just sets Modified flag onto false and then while loading (openining new file) program will not ask you whether to save changes in previous file. So Close project then open file.



    Rafal Gaweda
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Product Support
    Posts: 2,543
    Registered: ‎04-26-2010

    Re: Robot API - open and close project issues

    01-02-2013 01:15 AM in reply to: guillaumeniel
     

    Second question : I open RSA through API using 

     

    Dim Robot As New RobotApplication
    Robot.Visible = True
    Robot.Window.Activate

     

    I would like the RSA window to come to the front, above the window form which the API script is launched (Rhino&Grasshopper in my case - it could be Excel). It is not the case with my script, RSA just appears in the task bar, but does not become visible. How can I do that ?

     

     

    After Robot.Visible = True it should be visible.
    If you want it in foreground you have to use windows system functions, most likely using RobotApplication.Window.Handle

     



    Rafal Gaweda
    Product Support
    Autodesk, Inc.
    Please use plain text.
    Active Contributor
    Posts: 34
    Registered: ‎12-07-2012

    Re: Robot API - open and close project issues

    01-02-2013 12:30 PM in reply to: RG_Adsk

    OK, 

    Thanks.

    Please use plain text.