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