Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Structure verification through API

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
20086033
360 Views, 3 Replies

Structure verification through API

 

 

I'm writing a script that removes unitilised bars and i need to check for instability after removal of each bar.

Is there any method in the API that checks the model for singularities without running a full calculation?

 

3 REPLIES 3
Message 2 of 4
Rafal.Gaweda
in reply to: 20086033


I'm writing a script that removes unitilised bars and i need to check for instability after removal of each bar.

Is there any method in the API that checks the model for singularities without running a full calculation?

 



No, you have to run calculation.



Rafal Gaweda
Message 3 of 4
20086033
in reply to: Rafal.Gaweda

OK.

 

Is there anyway I can abort the calculations when presented with a warning? I realise that i can abot manually by clicking the dialog box that appers with the warning, but I'm looking for a way to automise this task.

 

Hope you can help.

Message 4 of 4
Rafal.Gaweda
in reply to: 20086033

Very simple example written in C# which shows how to handle the warnings generated by calculation engine and how to break the calculations if needed.

 

namespace MyCalc
{
    class Program
    {
        static void Main(string[] args) {
            RobotOM.RobotApplication app = new RobotOM.RobotApplication();
            app.Project.Open(@"c:\Temp\Pdelta.rtd");
            app.Project.CalcEngine.CalcNotifyEx += new RobotOM._IRobotCalcEngineEvents_CalcNotifyExEventHandler(CalcEngine_CalcNotifyEx);
            Console.WriteLine(app.Project.CalcEngine.Calculate().ToString());
            app.Project.CalcEngine.CalcNotifyEx -= new RobotOM._IRobotCalcEngineEvents_CalcNotifyExEventHandler(CalcEngine_CalcNotifyEx);
        }

        static void CalcEngine_CalcNotifyEx(int nCaller, string strText, string strFullText, string strCaption, int nType, int nDataType, string strSelection, out bool bHandled, out int nReturnValue) {
            bHandled = false;
            nReturnValue = 0;
            if (nCaller == 1) { // CALCULATIONS==1
                if (!string.IsNullOrEmpty(strText)) {
                    bHandled = true;
                    nReturnValue = 7; // IDNO=7, break calculations
                    Console.WriteLine(strText);
                }
            }
        }
    }
}

 

 



Rafal Gaweda
Tags (1)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report