Force a shared parameter to a group not availiable

Force a shared parameter to a group not availiable

CharlesBerteaux
Advisor Advisor
1,164 Views
9 Replies
Message 1 of 10

Force a shared parameter to a group not availiable

CharlesBerteaux
Advisor
Advisor

A predecessor of mine built all of our Revit templates. In our models we have custom parameters that have been somehow forced under the “Display” grouping…My new parameter “G_View_Project” was built exactly like the others currently under the Display Grouping……anyone out there know how to do this??? I am using Revit 2017

 

D1D_SEED_Parameter.png

 

 

 

 

Charles Berteaux Iv
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

0 Likes
1,165 Views
9 Replies
Replies (9)
Message 2 of 10

Revit_Whisperer
Collaborator
Collaborator

When were the templates originally created?  Perhaps that is a Group that used to exist but got changed in later versions to something else?  

 

I have checked back as far as 2013 and I don't see that Group available.

0 Likes
Message 3 of 10

CharlesBerteaux
Advisor
Advisor

these were created in R2013, and I also checked this with all versions back to this one......

😞

 

Charles Berteaux Iv
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

0 Likes
Message 4 of 10

Revit_Whisperer
Collaborator
Collaborator

Hmmm....2013 was the first year they had onebox I think...I wonder if the flavors had different groups?  Seems unlikely though....

0 Likes
Message 5 of 10

CharlesBerteaux
Advisor
Advisor

I'm glad my logic is sound...lol

 

See i tried different parameter types (Text, number, Yes/No etc.) in different versions of Revit and the groups did not change at all

 

Somebody knows, and my legacy templates are proof....i just need to know how, and I'm close to wits end...

 

Ive googled, talked to other guru's and no one knows.....

Charles Berteaux Iv
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

0 Likes
Message 6 of 10

Revit_Whisperer
Collaborator
Collaborator

I don't know if this will make you feel any better, and I am not the one to ask for help with the api...but I talked to someone on our development team and he said: 

 

No, it is not possible to create a ParameterGroup there are only fixed values.
“Display” is still one of the options in the API.

I don’t think you can add the group. It exists.
I don’t know why it’s hidden in the UI – I’m saying that hypothetically with the API you could assign a parameter to that group.

api.png

Message 7 of 10

CharlesBerteaux
Advisor
Advisor

This does not make me feel any better lol.....but thank you because its more info than Ive been able to dig up on my own 😞

 

Maybe I just need to take the current parameters and reassign them to something that is visible in the UI...if I can. Prob cant since its hidden by default. 

 

hacked revit.jpg

Charles Berteaux Iv
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

0 Likes
Message 8 of 10

Revit_Whisperer
Collaborator
Collaborator

I would think you could reassign them to another visible group....but this is Revit with some voodoo magic going on....so no guarantees 😃

0 Likes
Message 9 of 10

JimJia
Alumni
Alumni

Dear Charles Berteaux Iv,

 

Thanks for reporting this! Please accept our sincerer apology for the delay! We had a backlog in the queue these days.

 

Per my verify, Revit API can create project shared parameter to "Display" group successfully, while UI side failed to do this; this should be an issue of Revit, I already created issue to engineering team: [REVIT-100547 Force a shared parameter to a group not available while API can do this]

 

Following is my code example to create project parameter to "Display" group from shared parameter file, FYI:

        /// <summary>
        /// Creates project parameters to wall category from shared parameters file.
        /// All project parameters will be placed to "Display" group by hardcode.
        /// </summary>
        /// <param name="revitDoc"></param>
        /// <param name="paramFile"></param>
        /// <returns></returns>
        static public bool CreateSharedParametersByFile(Document revitDoc, string paramFile)
        {
            if (!File.Exists(paramFile))
                throw new FileNotFoundException("The given shared parameter file doesn't exist! ->" + paramFile);

            try
            {
                // cache application handle
                Autodesk.Revit.ApplicationServices.Application revitApp = revitDoc.Application;
                CategorySet cateSet = revitApp.Create.NewCategorySet();
                Category paramCat = revitDoc.Settings.Categories.get_Item(BuiltInCategory.OST_Walls);
                if (null == paramCat || !paramCat.AllowsBoundParameters)
                    return false;
                cateSet.Insert(paramCat);
                //
                // prepare shared parameter file
                string oldSharedFile = revitApp.SharedParametersFilename;
                revitApp.SharedParametersFilename = paramFile;
                //
                // open shared parameter file
                DefinitionFile parafile = revitApp.OpenSharedParameterFile();
                //
                // create parameter definition and bindings
                using (Transaction tran = new Transaction(revitDoc, "Create Shared Params"))
                {
tran.Start(); foreach (DefinitionGroup defGrp in parafile.Groups) { foreach (Definition def in defGrp.Definitions) { InstanceBinding binding = revitApp.Create.NewInstanceBinding(cateSet); revitDoc.ParameterBindings.Insert(def, binding, BuiltInParameterGroup.PG_DISPLAY); } } // // commit change tran.Commit(); } // // restore its shared parameter file to old one if (!string.IsNullOrEmpty(oldSharedFile)) revitApp.SharedParametersFilename = oldSharedFile; return true; } catch (Exception ex) { throw new Exception("Failed to create shared parameters due to exception: " + ex.ToString()); } }

Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
0 Likes
Message 10 of 10

JimJia
Alumni
Alumni

Dear Charles Berteaux Iv,

 

I talked with my colleagues, and I'm passing the message from engineering team:

"

We have a hardcoded property that tells us if a specific group is user assignable or not. It seems that this has been the case since early implementation and is valid for all parameters, not just shared ones. It is my understanding that this is the case for two reasons:

  1. 1. Usability: it isn't desirable to have a new parameter of a group that Revit already provides.
  2. 2. Functionality: there are certain internal parameters which are not visible to the user (likely) because it isn't desirable to group user created parameters under a un-user assignable group.

On the API side we have exposed the whole groups without any restriction from user assignable property. So yes, you will be able to create some parameters with a group value that is not possible to do from the UI, and sometimes you might have good reasons to do so depending on what you are trying to achieve in your Addin. For example, if you feel that reason #1 above is not really the case and you want to add a new parameter for a specific group which was considered originally to be not user assignable.

In the team's opinion, this behavior is working as expected. If we start getting user requests to modify this behavior, we can considering prioritizing it as an improvement in our development work.

"

 

This issue is important to me. What can I do to help?
This issue needs to be assessed by our engineering team, and prioritized against all of the other change requests that are outstanding. As a result any information that you can provide to influence this assessment will help. Please provide the following where possible:
• Impact on your application and/or your development.
• The number of users affected.
• The potential revenue impact to you.
• The potential revenue impact to Autodesk.
• Realistic timescale over which a fix would help you.
• In the case of a request for a new feature or a feature enhancement, please also provide detailed Use Cases for the workflows that this change would address.
This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact Change Requests.

 

We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.


Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
0 Likes