Access an ElementType's keynote builtinparameter

Anonymous

Access an ElementType's keynote builtinparameter

Anonymous
Not applicable

Hi, this is a beginner's question I guess. I am trying to access an elementtype's keynote parameter. I use the following code:

 

Element elem = doc.GetElement(pickedRef);
ElementType eType = doc.GetElement(elem.GetTypeId()) as ElementType;

 

Parameter paraUniCode = eType.get_Parameter(BuiltInParameter.UNIFORMAT_CODE);

Parameter paraKeynote = eType.get_Parameter(BuiltInParameter.KEY_VALUE);

 

then the assembly code gave me the right result, but the keynote is NULL.

 

I have assigned an assembly code and an element keynote to the element type in my model.

 

Where did I do wrong?

 

Thank you in advance!

0 Likes
Reply
396 Views
1 Reply
Reply (1)

RevitArkitek
Enthusiast
Enthusiast

The Keynote value is stored in KEYNOTE_PARAM not KEY_VALUE.

0 Likes