Shared parameters shows not in file Parameters

The FilteredElementCollector is getting the actual SharedParameterElements that exist in the model. That is all the shared parameters that have been loaded into a family or project. It has nothing to do with the current SPF.

Compare it to if you collected all the ParameterElements in the current document. This would be the actual elements representing a parameter that exist within a family or doc. There’s no “source” here to choose from because it’s the actual elements.

If you want the parameters from the SPF then you have to get them from the SPF. The currently active SPF doesn’t actually interact with the current document. It’s just a source for pulling parameter definitions at the time of import.

This post may be helpful.

In order to get the corresponding SharedParameterElements that exist within the active SPF, I think you’d have to compare both sources (GUID from SPF with GUID from elements). This of course would only work for parameters that have been loaded into the project via families or project parameters though.

1 Like