Family Instances and Type Parameters

I am trying to read a Type Parameter from a family instance.

I am far from success!

what i have so far:

elemsym = i.Symbol # that is the family instance

fmly = elemsym.Family # that is the family instance’s type

i was thinking that it is possible to access a family instance’s type parameter with:

fmlyparam = fmly.get_Parameter(parametername)

the result is “null”

 

any clue???

here my python code without includes:

 

elist = IN[0]

parametername =str(IN[1])

elements = []
out_list=list()

#out_list.append(parametername)

for i in range(0,len(elist)):
elements.append(UnwrapElement(elist[i]))

for i in elements:
elemsym = i.Symbol
fmly = elemsym.Family
fmlyist = elemsym.Family.Symbols

fmlyparam = fmly.get_Parameter(parametername)
#fmlyparam = fmly.Parameters
out_list.append(fmlyparam)
#out_list.append(elementIds)
#out_list.append(guid)
#out_list.append(elemsym)
#out_list.append(fmly)
#out_list.append(fmlyist)

OUT=out_list

Hi Peter,

I started with your code and added a “AsValueString” method to the extracted parameter to get the value. Does the following work for you?:

PyParam

dimitar, no same as before. “null”

i think the call itself is wrong?!

That’s strange. It’s working as expected for me:

Maybe you should try re-installing your Iron python and/or Dynamo?

 

2014-09-30_100114

2014-09-30_100130

 

dimitar, now your example is working!

i actually don t know why.

pertaining my code snippet:

i thought that i have to select the family in order to access the type parameters but actually it is the family symbol!

misinterpretation of the syntax.

thanks a lot.

peter