getting coordinate based on survey point from dynamo

getting coordinate based on survey point from dynamo

ahmad_jaberQ5SLJ
Contributor Contributor
589 Views
3 Replies
Message 1 of 4

getting coordinate based on survey point from dynamo

ahmad_jaberQ5SLJ
Contributor
Contributor

hi guys I am new to dynamo, I want to get coordinates point for embedded plates, because i want the coordinates to be in schedule i am using dynamo to extract the coordinates and place them in shared parameter i created, I was able to create a script but the coordinates is based on internal origin, the project I am working on has real world data and we are using shared coordinates for survey point, the question is how to convert the coordinates from internal origin to survey point in dynamo, I tried different ideas but didn't work.

0 Likes
590 Views
3 Replies
Replies (3)
Message 2 of 4

harilalmn
Advocate
Advocate

Hi, 
I am not sure what you mean by embedded plates. I have tried something with Structural Stiffeners.
Create a code block in Dynamo with the following code. Make changes to the Parameter names as required. I am updating four parameters here;

Internal Origin X : X coordinate based on internal origin 
Internal Origin Y : Y coordinate based on internal origin 
Survey X : X coordinate based on survey point

Survey Y : Y coordinate based on survey point


'e' is collection of stiffeners.

surveyPoint = Coordinates.SurveyPoint();
elementsLocation = Revit.Element.GetLocation(e);

elementsX = Point.X(elementsLocation);
elementsY = Point.Y(elementsLocation);

surveyPointX = Point.X(surveyPoint);
surveyPointY = Point.Y(surveyPoint);

locationBySurveyPointX = elementsX - surveyPointX;
locationBySurveyPointY = elementsY - surveyPointY;

Revit.Element.SetParameterByName(e, "Internal Origin X", elementsX);
Revit.Element.SetParameterByName(e, "Internal Origin Y", elementsY);
Revit.Element.SetParameterByName(e, "Survey X", locationBySurveyPointX);
Revit.Element.SetParameterByName(e, "Survey Y", locationBySurveyPointY);



0 Likes
Message 3 of 4

ahmad_jaberQ5SLJ
Contributor
Contributor

ahmad_jaberQ5SLJ_0-1746535035694.png

this is the embedded plate, the red dots are the places where I want to get the coordinates from, when I posted the question, the family was only a plate so I was able to select the edges. now after the change i have no idea how to select them.

do u have away to do it? i want to get the coordinates of the edges in red color then convert it from internal origin to survey point and fill a specific parameter.

0 Likes
Message 4 of 4

harilalmn
Advocate
Advocate

You can calculate the values. The top-right corner and bottom-left corner could be calculated from the width and depth of the plate. For example, top-right could be; 

Point.ByCoordinate(location.X + width / 2, location.Y + depth / 2, 0);

and bottom left could be;

Point.ByCoordinate(location.X - width / 2, location.Y - depth / 2, 0);

... if you have width and depth parameters. 

0 Likes