Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Somebody know if it is possible to create in VBA or C# a connection with its characteristics?
Thanks
Solved! Go to Solution.
Hello,
Somebody know if it is possible to create in VBA or C# a connection with its characteristics?
Thanks
Solved! Go to Solution.
you should read this topic
https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-create-a-frame-knee/m-p/8302913
RobotApplication RobApp = new RobotApplication();
IRJointConnectionServer JointServer = RobApp.Project.Connections;
RJointConnectionInfo JointInfo = JointServer.CreateInfo();
JointInfo.DefType = IRJointConnectionDefType.I_JCDT_STANDALONE;
IRJointConnection Connection = JointServer.Create(IRJointConnectionType.I_JCT_KNEE_WELDED);
IRJointKnee KneeWelded = (IRJointKnee)Connection;
KneeWelded.Beam.Section = "IPE 300";
KneeWelded.Column.Section = "IPE 300";
Connection.SetToRobot(JointInfo);Best Regards
you're wright, it seems that the barNumber parameters for the beam and column have get and set accessors.
Best Regards
updated
RobotApplication RobApp = new RobotApplication();
IRJointConnectionServer JointServer = RobApp.Project.Connections;
IRJointConnection Connection = JointServer.Create(IRJointConnectionType.I_JCT_KNEE_WELDED);
int num = 1;
RJointConnectionInfo Info = JointServer.CreateInfo();
Info.DefType = IRJointConnectionDefType.I_JCDT_IN_STRUCTURE;
Info.Name = $"Knee Welded {num}";
Info.Number = num; Info.Node = 2; Info.Elements.FromText("1 2");
IRJointKnee Knee = (IRJointKnee)Connection;
Knee.KneeType = IRJointKneeType.I_JKT_BEAM2COLUMN;
Knee.BracketLow.Exist = 1;
Knee.BracketLow.Length = 1000;
Connection.SetToRobot(Info);
Thank you @Stephane.kapetanovic ,
But I've tried many times and I don't understand why I have this error.
Do you have some solutions that I can fix it?
Best regards!
The API itself is not the issue; the problem lies in the availability of the connection server. A good practice is to first ensure the structure has been analyzed and to manually create a connection in standalone mode. This will activate the server. You can then run your script to generate the connections, making sure to handle the numbering carefully.
Best Regards