distinction between a shared parameter added to a family loaded into a project and project shared parameter

distinction between a shared parameter added to a family loaded into a project and project shared parameter

danielgijsbers
Contributor Contributor
486 Views
3 Replies
Message 1 of 4

distinction between a shared parameter added to a family loaded into a project and project shared parameter

danielgijsbers
Contributor
Contributor

I would like to find out if a shared parameter has been added to a project through a loadable family or whether the shared parameter has been added through the project parameters dialogue box.

 

When I look with the snoop tool I can't find the differences between the two parameters.

 

I have added a rvt example with two shared parameters the parameter called 'NLRS_C_breedte' has come in through a family and the parameter called 'xxx-pmparam' has been added to the file as a project shared parameter.

2021-09-30_15h01_27.png

please let me know 

 

 

0 Likes
Accepted solutions (1)
487 Views
3 Replies
Replies (3)
Message 2 of 4

Omar_Amen
Advocate
Advocate

Hi @danielgijsbers,
I just noticed in GUI the project parameters contains only the parameters that has been added to the file as a project shared parameter:

sc1.png

 so I tried this code which retrieve all the project parameters (shared/project) and it returned only the 'xxx-pmparam'

sc2.png

 so you can use it to get all project parameter and then exclude the project parameters from the list,
you will get all parameters that has been added to the file as a project shared parameter not through a family

 

0 Likes
Message 3 of 4

Omar_Amen
Advocate
Advocate
Accepted solution

my code : 

            List<string> result_KeyName = new List<string>();
            BindingMap map = doc.ParameterBindings;
            DefinitionBindingMapIterator it = map.ForwardIterator();
            it.Reset();
            while (it.MoveNext())
            {
                result_KeyName.Add(it.Key.Name);
            }
0 Likes
Message 4 of 4

danielgijsbers
Contributor
Contributor

Thank you!