Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I check if a FamilyParameter is a BuiltInParameter?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
1989 Views, 5 Replies

How can I check if a FamilyParameter is a BuiltInParameter?

I'd like to know if a given FamilyParameter is a system parameter that cannot be removed. How to do that?

5 REPLIES 5
Message 2 of 6
jeremytammik
in reply to: Anonymous

Please correct me if I am wrong or misunderstanding something.

 

Afaik, a family parameter is never a built-in parameter.

 

A family parameter has been defined by the family definition in an RFA file.

 

Unfortunately, it can only be identified by the user display name.

 

A built-in parameter can always be identified by the built-in parameter enum.

 

Here is what I learn by browsing the Revit API help file RevitAPI.chm:

 

Both have a parameter definition; the Definition object is a base object for all type of parameter definitions within the Autodesk Revit API.

 

The definition is either an ExternalDefinition or an InternalDefinition.

 

Try casting to those to find out.

 

The InternalDefinition has a BuiltInParameter property.

 

The ExternalDefinition object adds properties specific to Autodesk Revit shared parameter definitions.

 

I hope this helps.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 6
Revitalizer
in reply to: jeremytammik

Hi Jeremy,

 

a FamilyParameter can indeed be a BuiltInParameter.

FamilyParameter.Definition is an InternalDefinition.

Its BuiltInParameter property is either invalid or a valid BuiltInParameter value.

 

BIP_Invalid.pngBIP_Manufacturer.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Cheers,

Rudi




Rudolf Honke
Software Developer
Mensch und Maschine





Message 4 of 6
Revitalizer
in reply to: jeremytammik

Hi,

 

didn't read that you already wrote:

 

"The definition is either an ExternalDefinition or an InternalDefinition.

 

Try casting to those to find out.

 

The InternalDefinition has a BuiltInParameter property."

 

That's the solution, already.

 

 

Rudi

 




Rudolf Honke
Software Developer
Mensch und Maschine





Message 5 of 6
Anonymous
in reply to: jeremytammik

Thanks a lot for your feedback!

Message 6 of 6

thanx just helped me out, didnt know you could cast like that.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report