I'm trying to get the location point of a floor, so I found this code on a other topic :
LocationCurve lc = floor.Location as LocationCurve;
Line l = lc.Curve as Line;
XYZ locPts = l.GetEndPoint(0) as XYZ;
But i get a NullReferenceExcepetion on the second line and I Don't know how to solve it.
If someone has an idea.