Hi everyone,
I am tasked with cleaning a file and do a bunch of things regarding parameters.
I do not wish to delete something useful so I used Dynamo to analyse the project parameters and discorvered some mysterious things.
For a bit of context, here is what I did :
- Retrieve all project parameter names (Bindings --> Definition --> Name)
- Retrieve all parameter elements in the doc ( FilteredElementCollector(doc).OfClass(ParameterElement) )
- Retrieve all ids of parameters used in schedules ( FilteredElementCollector(doc).OfClass(ViewSchedule) --> Definition --> GetField --> ParameterId)
- Retrieve all ids of parameters used in filters
- Retrieve all Guids of shared parameters used in loaded family (reading the Attributes of xml created with ExtractPartAtom)
I compare everything, ids and Guids wich gives me a dict like this :
{
"ParameterName1" : [ { "Id" : FirstIdCorrespondingToName,
"Guid" : Corresponding Guid if SharedParameter,
"UsedInSchedule" : True/False,
"UsedInFilters": True/False,
"InProjectParameter" : True/false
"AssociatedFamilies" : [fam1, fam2,...] },
{ "Id" : secondIdCorrespondingToName,
"Guid" : Corresponding Guid if SharedParameter,
"UsedInSchedule" : True/False,
"UsedInFilters": True/False,
"InProjectParameter" : True/false
"AssociatedFamilies" : [fam1, fam2,...] }, ... ],
"ParameterName2" : ...
}
Doing that I get parameters that are :
- SharedParameters in my project
- Not in any binding
- Not used in schedules nor Filters
- In none of my families
The question is what are these parameters ? How can I find what they are used for or come from ?
Here is an exemple :
Some parameters with the same result exist also in a new Revit file created from Default Architectural Template but not in an empty file :
Name : "A" Guid : "74b1142d-1fao-4be5-b45f-43329c8998c4"
Name : "W" Guid : "0a80a6d4-9571-4df6-9677-03211e72047a"
Doing some research, these seem to be related to Steel Elements but are nowhere to be found in Revit interface.
Additionnally, some of these are used in schedules.
Sorry for french display, here is an exemple of a Railing schedule.
First screen shot : unbound, shared, not in any loaded family. If I remove it from the schedule manually, I can't put it back, it disappears from the available fields.
Second screen shot : Bounded ! (but not to the railings Category !), shared, not in any loaded family
What are those ? Note a parameter with the same name exists but is nowhere to be find (not in schedules nor in filters nor families)
Attach is a purged sample file so you can try and find out as well as the Dynamo Graph.
I hope that someone can guide me towards understanding this.
Solved! Go to Solution.
Solved by Christoph_Marthaler_AWZH. Go to Solution.
For some reason attachments did not work, here they are
Suggest you recheck the bindings as below:
Note also that extracting part atom does not include instance parameters from families.
It is bound to doors (to indicate the emergency exit type perhaps).
The parameter you point out is the parameter with the Id 973418.
My issue is with the one which has the Id 290589.
In the window you propose you can only see bounded parameters (InsereDansProjet = true in my file)
Did not know that PartAtom only gave type parameters ! Guess I will have to go back to getting the parameters Guid from the family documents 😨
Revit creates a new SharedParameterElement each time a new shared parameter is added to the project. Either by project parameters or by families. However, Revit never deletes them, even if the associated elements are deleted.
I looked for the top one below and found it, you described it as 'unknow mysterious parameter' but not to me. However that may be my confusion with the way Dynamo presents lists or your task in general. However I looked for that exact parameter by guid not name. So you are saying you have two different shared parameters of the same name but can only find one, or you find two but don't know where one is used perhaps?
The second one I didn't look for since you noted it was 'bonded' and displayed in 'project parameter tab'
Generally I hear you can delete a ParameterElement that points to a binding but I never really trust that and tend to work directly with the bindings. To me (by perception) a SharedParameterElement is a further managed object relation away from what Revit actually uses itself. Although they have their uses and you may find that verifying what shared parameters still exist in a family is one of them. You'll need to edit the file in the background however and go through all the levels of nesting.
I've also noted in the past that a binding is never really removed just sometimes hidden. As a test long ago I once removed a binding for a certain shared parameter guid, changed the name of the parameter and loaded it back in (with same guid). In that example I haven't repeated recently it kept the old name. So logically to know the old name for that new binding for same guid it must have still existed even though it was 'removed' or became non-visible. I think they should be treated as immutable. Perhaps if you audit/compact file etc. then they get removed but I think Revit has this thing about needing to permanently remember a shared parameter guid.
Can't find what you're looking for? Ask the community or share your knowledge.