Getting XYZ, would like point in Dynamo

I’m trying to get the 2 points from the Room Calculation Points for my Doors, most Nodes that do something with this are returning the Room at that point, I would like the Point itself.

I’ve found the GetSpatialElementFromToCalculationPoint() method to query the Door element for those, the result is as follows so far:

Been trying to get Points from those XYZ values, but it’s giving me Revit.DB.Point elements or the ToDSType(False) method does not get recognized.

Can someone point me in the right direction?

Why not use a bit of standard string parsing and number conversion with OOTB Dynamo nodes and then create the point?

@Bjorn_Keulemans1, you want to convert Revit type to Dynamo type so, you need to import “GeometryConversion”

clr.AddReference(‘RevitNodes’)
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

add these references and it should be fine.

1 Like

That was my backup idea, I’ve struggled with the Revit/Python ownership of elements before and wanted to see if I could get a more solid grasp on the concept, while making this Node and solving a question that came across my desk.

I’ve tried that a little after making the first post here, and unfortunately it didn’t seem to work.

I’ve left it here for today, might pick it up later this weekend.

I’ve got my points, but not as Dynamo elements, and there’s a logic flaw somewhere, because I’m making 6 points from 2 sets of 2 XYZ values.

@Bjorn_Keulemans1, of course, you need ToPoint method for type conversion.

According to your code, it should be like this;

z.append(p.ToPoint())

  • p is your XYZ point (Revit Type)
  • p.ToPoint() (Dynamo Type which is what you want)

Thanks a lot, I’m getting Point in Dynamo indeed.

Job for this weekend is now to look at my looping and solve the 4 becomes 6 issue.

Thanks.

A post was split to a new topic: Door CalculationPoints missing in Revit 2021