Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get new points offset along wall direction from point

Message 1 of 3
836 Views, 2 Replies

How to get new points offset along wall direction from point

I have a point and want to offset in the positive and negative direction along the wall a set distance say 450mm and then create lines perpendicular from those points to an offset


XYZ centre = (location as LocationPoint).Point;
XYZ direction = GetDirection(wall);
return Line.CreateBound(centre, direction);


Message 2 of 3

I assume you've solved it now from other post? XYZ implements operators that make such things straightforward.


Obtain the unit vector of the direction you want to move the point:

C1 = GetDirection(wall).Normalise

Probably should already be normalised in this case but doing it again doesn't hurt (assume you used location line direction).


Multiply it by the distance you want to move the point in feet:

C2=C1 * 450/304.8


Add the vector to the original centre:

Result = centre + C2


To move in opposite direction

Result = centre - C2



Message 3 of 3

Thanx RPThomas,

I mostly wanted to know I was on the right track to solving this problem and not doing it the difficult way.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups

Rail Community