# Create plane using python

**URL:** https://forum.dynamobim.com/t/create-plane-using-python/76381
**Category:** Revit
**Created:** [May 10, 2022, 10:41am UTC](https://forum.dynamobim.com/t/create-plane-using-python/76381 "2022-05-10T10:41:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![wodud9492](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wodud9492](https://forum.dynamobim.com/u/wodud9492)
#### Post date: [May 10, 2022, 10:41am UTC](https://forum.dynamobim.com/t/create-plane-using-python/76381/1 "2022-05-10T10:41:14Z")

</div>

I want to take the coordinates of the vertices from Excel and make a plane to cut the object. It is necessary to make a plane with four or three coordinates. Can I get a Python code related to this? 😰

---

<div class="post-metadata">

### Author: ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)
#### Post date: [May 10, 2022, 10:45am UTC](https://forum.dynamobim.com/t/create-plane-using-python/76381/2 "2022-05-10T10:45:09Z")

</div>

Hi @wodud9492 ,

What do you mean with plane ? A topo ? Workplane?  
it is imput-driven f.e. CSV (i would recoment)

KR

Andreas

> [@Python create point(s)](https://forum.dynamobim.com/t/python-create-point-s/42957):
>
> Can someone point me to where I might find a link describing the missing part of my code to create multiple points not just the last in the sequence. I am happy to read any reference, but would apreciate any help in finding a good link explaining this paticular process. import clr clr.AddReference("ProtoGeometry") from Autodesk.DesignScript.Geometry import \* x = IN[0] y = IN[1] z = IN[2] pt = [] for xpt,ypt,zpt in zip(x,y,z): pts = Point.ByCoordinates(xpt,ypt,zpt) …

---

<div class="post-metadata">

### Author: ![wodud9492](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wodud9492](https://forum.dynamobim.com/u/wodud9492)
#### Post date: [May 10, 2022, 10:49am UTC](https://forum.dynamobim.com/t/create-plane-using-python/76381/3 "2022-05-10T10:49:33Z")

</div>

that is workplane like plane.by three points node.

---

<div class="post-metadata">

### Author: ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)
#### Post date: [May 10, 2022, 10:50am UTC](https://forum.dynamobim.com/t/create-plane-using-python/76381/4 "2022-05-10T10:50:37Z")

</div>

OK @wodud9492 a refernceplace thats driven by 3 points

---

<div class="post-metadata">

### Author: ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)
#### Post date: [May 11, 2022, 3:50am UTC](https://forum.dynamobim.com/t/create-plane-using-python/76381/6 "2022-05-11T03:50:29Z")

</div>

A Dynamo plane can be built in Python using this code snippet (assuming you have the geometry library loaded in already). Note that pntsLIst needs to be a single list of at least 3 points:

plane = Plane.ByBestFitThoughPoints(pntsList)

A geometric plane (nothing you can see in the user interface) in Revit is a bit different. The exact API call is here: [CreateByThreePoints Method](https://www.revitapidocs.com/2022/a18aa7a2-71b6-5fa2-8ca8-abadedb638d7.htm)

Note that this takes XYZ objects as inputs, so you’ll need to build XYZs from the X, Y, and Z values you were using to build points.

Any particular reason you’re using Python instead of standard Dynamo?
