How to convert SiteSubRegion (System.Object) to Dynamo Element?

Good morning,

I’m creating a SiteSubRegion object in a Python node. I then want to use the SiteSubRegion more inside Dynamo as a topography. The Revit object needs to be converted or else I get this error:
image

The SiteSubRegion doesn’t have ToDSType() method. One solution I found in this thread was as follows (credits: Durmus_Cesur):

The issue I see with this however is that this will not work if there are more topography’s in the project.

So does anyone know of a way to convert SiteSubRegion class to Dynamo element?

Thank you!

There is a SiteSubRegion.TopographySurface property that can be returned a Dynamo element; however, it doesn’t seem to have any information as opposed to selecting the sub region w/ the Select Model Element node:
image

Can you attach a sample data set and a simple DYN showing how you got to that point? It’s impossible to help otherwise.

1 Like

Yes,

Here is my graph:

And here is the python node

Please note this graph works only with a closed loop for the lines input.

I would like to use the output of the subgregion to use for Topography.Points in the same run.

Please let me know if you have any questions. Thanks!

sorry the phython script did not work at all for me, could you write the code in text? and tell what inputs are necessary of lines, is it necessary to create a list by closed loop of lines to make it work?