Placing an exisiting MEP space with no current location

Hi all. Hopefulyl I can explain what I’m trying to do clearly. I have created a bunch of Spaces in my model, but they aren’t placed anywhere in the model. You can only see them in the schedule:

Using the code block below ‘Element.SetLocation’ I can adjust the location if I place the space, but with it unplaced I get an error.


So I thought I’d try and re-write the node to figure it out, because in theory you should be able to just re-write the Location of the selected elements. However my Python skills are pretty limited at the moment, so my question is: In the ‘for’ loop how do I make sure that 'Element.Location.SetValue() is pointing at the right element ID? I’ve been looking for an example bit of code but had no luck. I think I can figure out the rest, it’s just this bit where I’m stumped.

Any direction is much appreciated!
Thanks,
Liam

Hi @Liam_Alsop

Looks like those Spaces are unplaced in your model. To know exactly where the spaces located go to your view and hit “VG” go to spaces sub category check all. You will get your unplaced spaces. Good Luck!

Hi Kulkul,

Thanks for the quick resonse, I think I got my question the wrong way round though.

I want those spaces to be unplaced. I want to use Dynamo to place them at specific points calculated by the script. I think the problem is, the ‘Location’ attribute of the space is ‘NoneType’ when it isn’t placed, so when I try and replace it with a ‘Point’ I get an error: