Dimension

Dimension

stavh
Explorer Explorer
296 Views
2 Replies
Message 1 of 3

Dimension

stavh
Explorer
Explorer

stavh_0-1657818570565.png

Hey Everyone’

I am trying to create a dimension between the TV electric point to the wall that host the door.

The problem I am facing is how to find the XYZ coordinate on the wall to create a straight line between the TV electric point to the wall.

I created a plane using the wall locationCurve and a vector directed up ,XYZ(0,0,1).

plane = Plane.CreateByOriginAndBasis(eleHostLine.GetEndPoint(0), upVector, eleHostLineXYZ);

 and projcted the point on the plane using

UV uv;

double distance;

plane.Project(plugInXYZ, out uv,out distance);

 

now I am tring to find what are the XYZ coordinate of the projected point on the plane using the UV coordinate.

Idea anyone?

0 Likes
Accepted solutions (1)
297 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

Yes. To get from the 2D UV to the 3D XYZ you can use a Face object and its Evaluate method:

  

https://www.revitapidocs.com/2022/d1219dd7-fc7a-6b12-afce-963d554e947d.htm

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

stavh
Explorer
Explorer

Thank you jeremy

0 Likes