ROBOT API - problems of existants connections

ROBOT API - problems of existants connections

durducgeorge
Contributor Contributor
462 Views
6 Replies
Message 1 of 7

ROBOT API - problems of existants connections

durducgeorge
Contributor
Contributor

Hello,

 

I want to modify somme lengts or widths of some existent. And when I have a connection like this:

durducgeorge_0-1752477574567.pngand the plate on bottom is deleteddurducgeorge_1-1752477655996.png.

 

My code is:

 

List<int> totalAss = new List<int>();


RobotApplication RobApp = new RobotApplication();

RobotStructure RPS = RobApp.Project.Structure;

IRJointConnectionServer JointServer = RobApp.Project.Connections;

int num = 0;
int numbers_of_ass = 0;

numbers_of_ass = JointServer.Count;

 

for (int i = 1; i <= numbers_of_ass; i++)
{
num = i;

IRJointConnection Connection = JointServer.Get(num);


RJointConnectionInfo Info = JointServer.GetInfo(num);

Info.DefType = IRJointConnectionDefType.I_JCDT_IN_STRUCTURE;


double hauteur_profile;

if (Info.Type == IRJointConnectionType.I_JCT_KNEE_BOLTED && Info.Name == "Angle de portique")
{
IRJointKnee jointKnee = (IRJointKnee)Connection;

string jarretCommun = "";
double angleBeam = jointKnee.Beam.Angle;


// determinaation jarret du noeud commun
RobotBar beam = (RobotBar)RPS.Bars.Get(jointKnee.Beam.BarNumber);

int noNodeCommun = 0;


int coeffIfAngleObtuz = Utilities.isObtuzAngle(
ref RobApp,
jointKnee.Beam.BarNumber,
jointKnee.Column.BarNumber);


if (beam.EndNode == ((RobotBar)RPS.Bars.Get(jointKnee.Column.BarNumber)).EndNode)
{
noNodeCommun = beam.EndNode;
}
else if (beam.EndNode == ((RobotBar)RPS.Bars.Get(jointKnee.Column.BarNumber)).StartNode)
{
noNodeCommun = beam.EndNode;
}
else if (beam.StartNode == ((RobotBar)RPS.Bars.Get(jointKnee.Column.BarNumber)).EndNode)
{
noNodeCommun = beam.StartNode;
}
else if (beam.StartNode == ((RobotBar)RPS.Bars.Get(jointKnee.Column.BarNumber)).StartNode)
{
noNodeCommun = beam.StartNode;
}

if (beam.EndNode == noNodeCommun)
{
//MessageBox.Show(beam.Start.GetLabel(IRobotLabelType.I_LT_BAREND_BRACKET).Name);

try
{
jarretCommun = beam.End.GetLabel(IRobotLabelType.I_LT_BAREND_BRACKET).Name;
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}

if (beam.StartNode == noNodeCommun)
{
//MessageBox.Show(beam.Start.GetLabel(IRobotLabelType.I_LT_BAREND_BRACKET).Name);
jarretCommun = beam.Start.GetLabel(IRobotLabelType.I_LT_BAREND_BRACKET).Name;
}


double hauteurPerpJarret = Convert.ToDouble(jarretCommun.Split('x')[1].Split(' ')[1]) -
2 * jointKnee.BracketLow.ThickFlange;
double longueurHarret = jointKnee.BracketLow.Length;

double angleJarret = Math.Asin(hauteurPerpJarret / longueurHarret);
double angleDeDetermionat =
angleJarret + Math.Sqrt(angleBeam * angleBeam) * Math.PI / 180 * coeffIfAngleObtuz;

jointKnee.StiffTypeLow = IRJointKneeReinfType.I_JKRT_BRACKET;

jointKnee.BracketLow.Height = (hauteurPerpJarret + jointKnee.BracketLow.ThickFlange) /
Math.Cos(angleDeDetermionat);

jointKnee.Bolts.ShearPortion = IRJointBoltShearPortion.I_JBSP_THREADED;


if (Convert.ToDouble(jointKnee.Column.Section.Split(' ')[1]) < 450)
{
jointKnee.WebColumnStiffenerHUpper.Thick = 10;
jointKnee.WebColumnStiffenerHLower.Thick = 10;
}
else
{
jointKnee.WebColumnStiffenerHUpper.Thick = 15;
jointKnee.WebColumnStiffenerHLower.Thick = 15;
}

Connection.SetToRobot(Info);

 

Best regards,

 

George DURDUC

0 Likes
Accepted solutions (2)
463 Views
6 Replies
Replies (6)
Message 2 of 7

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

hi @durducgeorge 

have you tried 

jointKnee.KneeType = IRJointKneeType.I_JKT_BEAM2COLUMN_CONTINUE;

Best Regards

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 3 of 7

durducgeorge
Contributor
Contributor

hi @Stephane.kapetanovic ,

 

it doesn't work. it makes column continue, but it's not good for my case.

 

The problem in fact is that before I "SetToRobot" when debugging, the jointKnee has the good length, thick and width but it shows that it doesn't exist (0 value for Exist...).

 

And even if I force with the value 1 it doesn't word (look below):

durducgeorge_0-1752517527803.png

 

0 Likes
Message 4 of 7

Stephane.kapetanovic
Mentor
Mentor
Accepted solution

did you add

jointKnee.StiffTypeUp = IRJointKneeReinfType.I_JKRT_STIFF;

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
Message 5 of 7

durducgeorge
Contributor
Contributor

yes, I add it. It doesn't work (it doesn't activate the stiffner type of bracket). But when I type this for the StiffTypeLow it works everytime ( only for the up side doesn't work).

0 Likes
Message 6 of 7

durducgeorge
Contributor
Contributor

Now It works only if I presse the apply button on the connection in Robot.

 

However, it would be nice if I can activate from Robot the presence of stiffener or bracket.

 

Well, it's ok even with that.

 

Thank you for the help Mr. @Stephane.kapetanovic !

 

Best regards!

Message 7 of 7

Stephane.kapetanovic
Mentor
Mentor

to remove the upper stiffener

jointKnee.KneeType = IRJointKneeType.I_JKT_BEAM2COLUMN;
//[...]
jointKnee.StiffTypeUp = IRJointKneeReinfType.I_JKRT_NONE;
IRJointKneeBracket BracketUp = jointKnee.BracketUp; BracketUp.Exist = 0; 
BracketUp.Width = 0; BracketUp.Length = 0; BracketUp.ThickFlange = 0; BracketUp.ThickWeb = 0;

to add it

jointKnee.KneeType = IRJointKneeType.I_JKT_BEAM2COLUMN_CONTINUE;
//[...]
jointKnee.StiffTypeUp = IRJointKneeReinfType.I_JKRT_STIFF;
IRJointKneeBracket BracketUp = jointKnee.BracketUp; BracketUp.Exist = 1;
BracketUp.Width = 80; BracketUp.Length = 160; BracketUp.ThickFlange = 0; BracketUp.ThickWeb = 10;

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes