I want to set ‘Family Types’ according to the sheet name.
What should I do?
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# The inputs to this node will be stored as a list in the IN variables.
sheetname = IN[0]
titleblock = []
# Place your code below this line
if sheetname in "PLAN":
titleblock = FamilyType.ByName("DHI_Sheet_A1_Key Plan FC")
elif sheetname in "MISC" or "SCHEDULE":
titleblock = FamilyType.ByName("DHI_Sheet_A1_No Bearing, No Scale FC")
else:
titleblock = FamilyType.ByName("DHI_Sheet_A1_No Bearing FC")
# Assign your output to the OUT variable.
OUT = titleblock