Hi, I'm trying to change a parameter group using InternalDefinition.ParameterGroup property as it has as getter as setter for it comparing to Definition.ParameterGroup property. I get the InternalDefinition of the parameter by casting Definition to InternalDefinition class for FamilyParameter instance or with GetDefinition() method for SharedParameterElement. All these steps return me the InternalDefinition but trying to get the ParameterGroup property returns me only Definition.ParameterGroup which has only getter. I found a tricky way to change the group by replacing the parameter with a familyparameter with necessary group and then to replace it back to shared. But probably there's a possibility to use InternalDefinition in right way?
Here's a part of the code I use:
private void ChangeParameterGroup(FamilyParameter par, BuiltInParameterGroup group)
{
(par.Definition as InternalDefinition).ParameterGroup = group;
}
or:
private void ChangeParameterGroup(SharedParameterElement par, BuiltInParameterGroup group)
{
par.GetDefinition().ParameterGroup = group;
}
PS. Using Python to process the same way lets me to change parameter group but after saving and closing the family document the result reverts back.
Thanks.