Generating NamedCplanes by list of Z Values

Hello, is it possible to generate namedCplanes by code feeding a list?
I want to set a file for a tower project and searching for how to generate 60 namedCplanes.

I was reading a little bit and think maybe its possible with rs.PlaneFromFrame and rs.addNamedCPlane.

But unfortunatly i havent enough knowledge to script it.

Does anybody know if it is even possible?


Hi Horst,

A contruction plane requires origin coordinates (x,y,z values).

You would like to create a list of named construction planes by inputting a list of their origins?

If so you can run the following script (Tools -> PythonScript -> Edit):

import rhinoscriptsyntax as rs
import Rhino

CPorigins = [(0,0,1), (10.5,0,0), (15.1,10,0), (12,12.2,0)]  # insert a list of 60 CPorigins

for i in range(len(CPorigins)):
    CPorigin = rs.coerce3dpoint(CPorigins[i])
    CPname = "CP(%s_%s_%s)" % (CPorigin.X, CPorigin.Y, CPorigin.Z)
    plane = Rhino.Geometry.Plane( CPorigin, Rhino.Geometry.Vector3d(0,0,1) )
    CPindex = Rhino.RhinoDoc.ActiveDoc.NamedConstructionPlanes.Add(CPname, plane)

Edit the CPorigins list so that it contains those 60 construction plane origins you have. At the moment it contains only 4 origins.

Hey Djordjie thanks alot!

that works nice! I posted a lilttle bit later in the Gh forum.

What would save me a lot of time if it would be possible drive it trough GH where i have the values imported from Bumblebee.

When i feed the list into the python component as x it seems that there is only the highest value getting recognized.

You have an idea?

And, man thanks a lot doing this by hand is a nightmare:) i wonder that there is no native component in rhino

Got it working!
thanks a lot for this!

will post result in gh fourm post.