Discussion Groups

Robot Structural Analysis

Reply
Active Member
odysseasg
Posts: 10
Registered: ‎02-24-2011

Robot Steel API

379 Views, 7 Replies
12-11-2011 02:40 PM

Hello,

 

i'm trying to retrieve CodeResults using RobotOM steel API. My code (at the failure lines) goes like this:

 

....

....

IRDimDetailedRes RDmDetRes;
RDmDetRes = (IRDimDetailedRes) RdmAllRes.Get(49); //get a specific bar 


IRDimCodeResEC3 RdmCodeRes;
RdmCodeRes = (IRDimCodeResEC3) RDmDetRes.CodeResults;

 

double MPl = RdmCodeRes.PlastMomStrenMplyrd;

 

When i run my code I get this error message: 


 error: Unable to cast COM object of type 'System.__ComObject' to interface type 'RobotOM.IRDimCodeResEC3'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{21F70924-8B6C-470F-A19F-5DC40565936D}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). (line: 186)

 

Am i using the wrong Code interface? Do i have to instansiate the codeparams for the specific code before that?

 

Thanks in advance. 


Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,303
Registered: ‎04-26-2010

Re: Robot Steel API

12-14-2011 04:22 AM in reply to: odysseasg

Try to use IRDimCodeResE32 interface



Rafal Gaweda
Please use plain text.
Active Member
odysseasg
Posts: 10
Registered: ‎02-24-2011

Re: Robot Steel API

12-14-2011 09:33 AM in reply to: Rafal.Gaweda

Rafal,

 

still that interface does not exist. I've also tried updating the com interface (from autodesks support page/COM hotfix)

but no change...

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,303
Registered: ‎04-26-2010

Re: Robot Steel API

12-15-2011 12:34 AM in reply to: odysseasg

Send me the whole code



Rafal Gaweda
Please use plain text.
Active Member
odysseasg
Posts: 10
Registered: ‎02-24-2011

Re: Robot Steel API

12-15-2011 08:13 AM in reply to: Rafal.Gaweda

// new object Robot application
RobotApplication robApp;
robApp = new RobotApplicationClass();

robApp.Interactive = 1;

 

if (robApp.Project.IsActive == 0)
{
System.Windows.Forms.MessageBox.Show("ERROR : Open an instance of Robot with the Model you would like to Design");
return;
}

 

// Dim robapp As IRobotStructure
IRobotStructure str;
str = robApp.Project.Structure;


int res = robApp.Project.Structure.Results.Available;

if (res == 0){

RobotCalcEngine CalcEngine; //
CalcEngine = robApp.Project.CalcEngine; // Calculation Engine
CalcEngine.Calculate(); // Run Calculations


}


IRDimServer server = (IRDimServer) robApp.Kernel.GetExtension("RDimServer");
server.Mode = IRDimServerMode.I_DSM_STEEL;

IRDimCalcEngine RDMEngine;
RDMEngine = server.CalculEngine;


IRDimCalcParam RDmCalPar;
IRDimCalcConf RDmCalCnf;

RDmCalPar = RDMEngine.GetCalcParam();
RDmCalCnf = RDMEngine.GetCalcConf();


RDimStream RdmStream; //Data stream for setting parameters
RdmStream = server.Connection.GetStream();
RdmStream.Clear();


//Calculate results for all sections
RdmStream.WriteText("all");
RDmCalPar.SetObjsList(IRDimCalcParamVerifType.I_DCPVT_MEMBERS_VERIF, RdmStream);//members verification

RDmCalPar.SetLimitState(IRDimCalcParamLimitStateType.I_DCPLST_ULTIMATE, 1);//Set Limit State
RdmStream.Clear();

RdmStream.WriteText("9"); //Set Load Case
RDmCalPar.SetLoadsList(RdmStream);


RDMEngine.SetCalcConf(RDmCalCnf);
RDMEngine.SetCalcParam(RDmCalPar);


RDMEngine.Solve(null); //Solve Calculations for defined members


IRDimAllRes RdmAllRes;
IRDimDetailedRes RdmDetRes;

RdmAllRes = RDMEngine.Results();


IRDimDetailedRes RDmDetRes;
RDmDetRes = (IRDimDetailedRes) RdmAllRes.Get(49);

 

//IRDimCodeResEC3
IRDimCodeResE32 RdmCodeRes;
RdmCodeRes = (IRDimCodeResE32) RDmDetRes.CodeResults;


double Mply = RdmCodeRes.PlastMomStrenMplyrd;

 

 

 

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,303
Registered: ‎04-26-2010

Re: Robot Steel API

12-19-2011 01:53 AM in reply to: odysseasg

What is the code set in Job Prefereces?

It should be ENV 1993-1-2005/AC:2009

 

One more hint: check whether the results for selected bar exist (not null)



Rafal Gaweda
Please use plain text.
Active Member
odysseasg
Posts: 10
Registered: ‎02-24-2011

Re: Robot Steel API

12-20-2011 03:25 AM in reply to: Rafal.Gaweda

Rafal,

 

i'm using that code and that i'm calculating design resluts for all the bars. Could you please send me the list of parent interfaces used in the API for Eurocode design codes? Or does IRDimEurocodeE32 superseeds all the previous eurocode interfaces?

Please use plain text.
Product Support
Rafal.Gaweda
Posts: 5,303
Registered: ‎04-26-2010

Re: Robot Steel API

12-20-2011 04:02 AM in reply to: odysseasg

IRDimCodeResEC3 - old eurocode

IRDimCodeResEC32 - new one and all NADs. You should be able to get results for all NADs but setting some country specific data for calculations may not be possible.

 

There are also interfaces for PN, ASD, CM66 codes in Robot.



Rafal Gaweda
Please use plain text.