Skip to content

Instantly share code, notes, and snippets.

@johnpierson
Created October 19, 2018 16:10
Show Gist options
  • Save johnpierson/d00fc1d8cca279c261cbccc6156deede to your computer and use it in GitHub Desktop.
Save johnpierson/d00fc1d8cca279c261cbccc6156deede to your computer and use it in GitHub Desktop.
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#our inputs
phases = IN[0]
#to output
results = []
#iterate through the input
for i in phases:
#here we get the type of the data and output it, if it is a string.
if i.GetType().ToString() == "System.String":
results.append(i)
else:
#if it wasn't a string, we output the name
results.append(i.Name)
#Assign your output to the OUT variable.
OUT = results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment