Mirroring a protogeometry point with python

Hi everyone, i’m new on python and im trying to use the dynamo “mirror” inside a python script but it doesn’t work.
i imported ‘Protogeometry’ with relative “Autodesk.DesignScript.Geometry” but nothing.

where am i getting wrong?
thanks!

PS: the pic it’s just an example i did to explain the post

First of all, you are already importing geometry from autodesk designscript, so no need to rewrite those in full later. I see you are importing revit api, so to avoid type clashing, what I tend to do is use the as keyword after importing protogeometry like this…

from Autodesk.DesignScript import Geometry as geom

And then you can just call geom.Plane.ByThreePoints(... )

As for mirror, this is under Geometry, so you need another Geometry. So, geom.Geometry.Mirror(...).

Hope this helps.

Cheers,
Dan

oh yes it’s working!! thanks!

Awesome! Glad to help! And I forgot to say welcome to the forum (as it’s your first post and all)! So welcome to the forum! :slightly_smiling_face:

Also, don’t forget to mark this as solved with the little checkbox so other people don’t come rushing to help and people with a similar problem know which post was the solution. :wink:

1 Like