Changing location point of element

I’ve been using a script to number parking spaces with a model line spline by how close the park is to the model line. However when parks are mirrored it will pick up the wrong park. Is there a way to move the location point to the center of the parking element before it runs to help with picking up the right park to number.

Thanks for any help. I’ve been looking through nodes with key words but cant find any that would help. Thought about if you could change the Y value of the location to be -500 to move it but this would conflict depending on which way the park iw facing. Dont know if my thinking makes sense to anyone.

Couldn’t you edit the family and move it to the middle?

Find the point and move it by the family’s transform coordinate system by 1/2 of the length along the Y axis.

hmmmm I just dont even know. Can you point me in the right direction somewhere? looking at the dynamo dictionary at the moment but its not helping so much

hmmm is this on the right track?

Not gonna find this one in the dictionary as it’s a bit outside of the beaten path (though I think there may be a Bakery version that does this too, I don’t have the package on my system at the moment). You’ll need a little Archilab and some Datashapes to build out my proposed solution.

Even Easier:

1 Like

to awesome! thanks so much man. super handy info

hmmmm when i tried to incorporate it into my script it moved the origin one way then the other. Any ideas? It is because some of my parks are mirrored! bugger. Any way around this? I’m not sure if what im saying is making sense but somthing that would map the outer edges of the element (bounding box?) then find the center and use that as the location point?


Seemed to solve my own issue, thanks for all the help anyway


Geometry calculation is slower than math and asking for known values, even when you’re using the simplicity of bounding boxes… but this works so no need to review further.

Next time out, know that there are other nodes which get the mirror values of transforms, which can be used to scale the transform distance, effectively putting the point in the right location even if the spots are mirrored.

1 Like

I am having the same problem with my parking space.
I run “Transform.OriginAndVectors” and get points to transform perpendicular to correct direction(the direction that I want).
But the Starting points are not in the middle of family.
(The Starting Points )

I think the reason why the Starting Points are not in the middle, is because my family does not model in the center.

If I do not re-model my family, I think BoundingBox is other option for me.

The question is: HOW do I translate the points perpendicular along the family(to the red point).