how to get curtain system center position

how to get curtain system center position

nj19790605
Contributor Contributor
640 Views
4 Replies
Message 1 of 5

how to get curtain system center position

nj19790605
Contributor
Contributor

I want to get center positon of a curtain system .

 

so I can change   it.  But I  don't find any property to it.

 

a1.jpg

0 Likes
Accepted solutions (1)
641 Views
4 Replies
Replies (4)
Message 2 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @nj19790605,

You can get the center position of the wall by using the following code

 Wall w ;
                    LocationCurve Lc = w.Location as LocationCurve;
                    XYZ location = Lc.Curve.Evaluate(0.5, true);

                    string x = location.X.ToString();
                    string y = location.Y.ToString();
                    string z = location.Z.ToString();

You can refer the below link

wall center


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 5

nj19790605
Contributor
Contributor

thanks ,but  curtain system   is more  complex.

 

 

 

0 Likes
Message 4 of 5

FAIR59
Advisor
Advisor

It isn't a property. The information is available through the parameters of the curtainsystem, though I am afraid you don't get a XYZ-value for that point.

CurtainSystem curtain ;
// Grid1
Parameter offset1 = curtain.get_Parameter(BuiltInParameter.CURTAINGRID_ORIGIN_1);
Parameter justification1 = curtain.get_Parameter(BuiltInParameter.SPACING_JUSTIFICATION_1);
Parameter angle1 = curtain.get_Parameter(BuiltInParameter.CURTAINGRID_ANGLE_1);
// Grid2
Parameter offset2 = curtain.get_Parameter(BuiltInParameter.CURTAINGRID_ORIGIN_2);
Parameter justification2 = curtain.get_Parameter(BuiltInParameter.SPACING_JUSTIFICATION_2);
Parameter angle2 = curtain.get_Parameter(BuiltInParameter.CURTAINGRID_ANGLE_2);

 

0 Likes
Message 5 of 5

nj19790605
Contributor
Contributor
Accepted solution

thanks.

 

I have get xyz position.

 

1. change  U grid number   to   1;

2.change  V  grid number   to   1;

3.use  api function   "grid.GetUGridLineIds()",  "grid.GetVGridLineIds()"  

    so  I get  two  Lines  .

 

their  intersect point   is    final    result;

0 Likes