- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I want to modify somme lengts or widths of some existent. And when I have a connection like this:
and the plate on bottom is deleted
.
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
Solved! Go to Solution.