Hi everyone!
How to set and retrieve a size(diameter of round ducts, height and width of rect ducts) of created ducts with API?
I'm using VS C#2010.
Solved! Go to Solution.
Solved by Joe.Ye. Go to Solution.
Hello,
You can get the duct's shape from the duct's parameter.
For the round duct, you can get and set the duct diameter via this parameter: RBS_CURVE_DIAMETER_PARAM
for the rectangle duct, get and set the height and width via these two parameters:
Width: RBS_CURVE_WIDTH_PARAM
Height: RBS_CURVE_HEIGHT_PARAM
For example, you want to increase a round diameter by 10mm. Here is the code fragment.
<code>
Parameter param = duct.get_Parameter(BuiltInParameter.RBS_CURVE_DIAMETER_PARAM);
double diameter = param.AsDouble();
param.Set(diameter+10);
<code>
Hope this helps!
Hello,
Is it possible to increase the input parameter of duct cross section? since in my case it's not recatngular or oval, it needs more parameter to be defined.