I have number of family instances containing piles and pilecaps. When I select the element, only the pilecap is handled by Dynamo. How can I bring the family in either as one of unioned solid or as a list of solids for each instance?
My end goal is to measure the volume of the family. I have tried doing this using GetParameterValueByName(“Volume”), but the resulting value only considers the pilecap.
Check you family file. If it is a nested family, try to change the “shared” option under family properties.
Thanks - the family is shared.
Used a workaround in Python:
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
doc = DocumentManager.Instance.CurrentDBDocument
#adjust unwrapping method to suit individual selection versus multi selection
try:
len(IN[0])
faminsts = UnwrapElement(IN[0])
except:
faminsts = [UnwrapElement(IN[0])]
#initialise output
outnest = list()
for inst in faminsts: #loop through instances
itemlist = list() #initialise sublist
itemlist.append(inst) #add parent element to sublist
try:
for subcomp in inst.GetSubComponentIds(): #loop through subcomponent IDs
itemlist.append(doc.GetElement(subcomp)) #Get subcomponent elements from ID and add to sublist
except:
donothing = 1 #handling for objects with no subcomponents
outnest.append(itemlist) #append sublist for item
# Assign your output to the OUT variable.
OUT = outnest