(API) Reading distributed loads

(API) Reading distributed loads

TimoKet
Contributor Contributor
671 Views
2 Replies
Message 1 of 3

(API) Reading distributed loads

TimoKet
Contributor
Contributor

I have a model, where some of the loads are modelled to claddings, which then distribute it to bars. I'm interested in those distributed bar loads, that are either uniform or trapezoidal. I've created a small example model, with 2 bars and single cladding, where I've put 1kN/m2 load

 

TimoKet_0-1612890736983.png


After calculating the model, I can visually check the loads to see their assumed values from API

TimoKet_1-1612890801834.png


When I read loadrecords from cases that have this kind of loads that are distributed, sometimes the loads can't tell which part they are attached to. Below is the code that I've ran

 

// Get RSA data
IRobotApplication app = new RobotApplication();
IRobotProject project = app.Project;
IRobotStructure structure = project.Structure;

// Get wanted load case
IRobotSimpleCase c = structure.Cases.Get(2) as IRobotSimpleCase;
RobotLoadRecordMngr loadings = c.Records;

Debug.WriteLine($"Case {c.Name} with {loadings.Count} loads");

// Loop through all loadings
for (int j = 1; j <= loadings.Count; j++)
{
	IRobotLoadRecord robotLoad = loadings.Get(j);
	IRobotLoadRecordCommon commonLoad = robotLoad as IRobotLoadRecordCommon;
	
	// Currently I'm only interested in the loads that have been determined by RSA from area loads
	if(!commonLoad.IsAutoGenerated) continue;
	
	RobotSelection objectSelection = robotLoad.Objects;
	List<int> objects = new List<int>();
	
	for (int k = 1; k <= objectSelection.Count; k++)
	{
		int no = objectSelection.Get(k);
		objects.Add(no);
	}
	
	// Load has been distributed as uniform load
	if(robotLoad.Type == IRobotLoadRecordType.I_LRT_BAR_UNIFORM)
	{
		Debug.WriteLine($"UniformLoad {j}, objects ({objects.Count}): {String.Join(" ", objects)}");

		double Fx = robotLoad.GetValue((int)IRobotBarUniformRecordValues.I_BURV_PX);
		double Fy = robotLoad.GetValue((int)IRobotBarUniformRecordValues.I_BURV_PY);
		double Fz = robotLoad.GetValue((int)IRobotBarUniformRecordValues.I_BURV_PZ);

		Debug.WriteLine($"	FX = {Fx}");
		Debug.WriteLine($"	FY = {Fy}");
		Debug.WriteLine($"	FZ = {Fz}");
	}

	if (robotLoad.Type == IRobotLoadRecordType.I_LRT_BAR_TRAPEZOIDALE)
	{
		// Load needs to be casted, so all of the different points can be read
		IRobotLoadRecordBarTrapezoidal castedLoad = robotLoad as IRobotLoadRecordBarTrapezoidal;

		Debug.WriteLine($"TrapezoidalLoad {j}, {castedLoad.PointCount} points, objects ({objects.Count}): {String.Join(" ", objects)}");

		for (int b = 1; b <= castedLoad.PointCount; b++)
		{
			double x = 0;
			double y = 0;
			double z = 0;
			double xx = 0;
			castedLoad.GetPoint(b, out x, out y, out z, out xx);

			Debug.WriteLine($"	Loc = {xx}, FX = {x}, FY = {y}, FZ = {z}");
		}
	}
}

 


The results are as below. Problem is, that the uniform part with 2.5kN/m value doesn't know which bars/elements it is attached to (or most likely it knows, but API can't read it). Is there any way to find out the bars or elements, where distributed loads are attached? The 'objectSelection' doesn't include any helpful information. Most likely the load is attached to a single element instead of a bar, as the type is uniform load instead of trapezoidal (it doesn't affect on full length of the bar)

Case DL2 with 3 loads
TrapezoidalLoad 1, 21 points, objects (1): 1
  Loc = 0, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,05, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,1, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,15, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,2, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,25, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,3, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,35, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,4, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,45, FX = 0, FY = 0, FZ = -2341,xxx-xxxxxxxx
  Loc = 0,5, FX = 0, FY = 0, FZ = -4449,xxx-xxxxxxxx
  Loc = 0,55, FX = 0, FY = 0, FZ = -4449,xxx-xxxxxxxx
  Loc = 0,6, FX = 0, FY = 0, FZ = -3981,xxx-xxxxxxxx
  Loc = 0,65, FX = 0, FY = 0, FZ = -3512,xxx-xxxxxxxx
  Loc = 0,7, FX = 0, FY = 0, FZ = -3044,xxx-xxxxxxxx
  Loc = 0,75, FX = 0, FY = 0, FZ = -2576,xxx-xxxxxxxx
  Loc = 0,8, FX = 0, FY = 0, FZ = -2107,xxx-xxxxxxxx
  Loc = 0,85, FX = 0, FY = 0, FZ = -1639,xxx-xxxxxxxx
  Loc = 0,9, FX = 0, FY = 0, FZ = -1170,xxx-xxxxxxxx
  Loc = 0,95, FX = 0, FY = 0, FZ = -702,576112412178
  Loc = 1, FX = 0, FY = 0, FZ = -234,192037470726
UniformLoad 3, objects (0):
  FX = 0
  FY = 0
  FZ = -2500

 

I'm testing this on RSA 2021 (34.0.0.7777 x64). I also tested the VBA script from link below, and results were similar: Some loads do not know the parts they are attached to.

https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-cladding-and-panels-creation/td-p...

0 Likes
672 Views
2 Replies
Replies (2)
Message 2 of 3

TimoKet
Contributor
Contributor

On additional note, I tried to check the loads from table, and result is same. Both the object list, and finite element list are empty

TimoKet_0-1612938680640.png

 

0 Likes
Message 3 of 3

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @TimoKet 

 

I am sorry, You will not retrieve these loads by API.

Not implemented.

 



Rafal Gaweda
0 Likes