How to determine if a family parameter is used in a Revit family file

How to determine if a family parameter is used in a Revit family file

Anonymous
Not applicable
1,753 Views
4 Replies
Message 1 of 5

How to determine if a family parameter is used in a Revit family file

Anonymous
Not applicable

This question concerns only Revit family files (.rfa)

I would like to do some cleanup and to delete the family parameters and the shared parameters that are not used in the document

How to determine that parameters are used (for instance for modeling like dimension, extrusion, ...) or not in a Revit family file ? 

Put another way, in the "Family Types" dialog box, if we try to delete a parameter that is used, then the user may be warned that this "parameter is currently used by 1 dimension(s) and/or array(s)".

How to determine such parameters with the api ?

0 Likes
1,754 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk

Maybe you can open a transaction, perform the deletion, and detect whether the UI warning message is displayed or not. If it is, roll back the transaction, and nothing changes. If it is not, the parameter did not cause a warning, and the deletion can be confirmed by committing the transaction.

 

Cheers,

 

Jeremy

 

 



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

0 Likes
Message 3 of 5

Anonymous
Not applicable

Thanks Jeremy for your answer.

I don't think that it works.

I use FamilyManager.RemoveParameter but it seems that the api proceeds the deletion silently. No warning message is shown.

 

Regards

0 Likes
Message 4 of 5

itono
Explorer
Explorer

Hello.

I'm facing exactly this problem with deleting parameters in a process using DesignAutomation for Revit.

Any progress on how to determine if a parameter is being used ?

0 Likes
Message 5 of 5

jeremy_tammik
Alumni
Alumni

No, no progress as far as I can see, and no ongoing work either.

 

If this question is important for you, it will probably help if you do some research yourself.

 

Just guessing, I would suggest that a very effective method to determine whether a parameter is being used could be implemented using a parameter filter, cf.

 

    

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes