Created
October 19, 2018 16:10
-
-
Save johnpierson/d00fc1d8cca279c261cbccc6156deede to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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