Modify Project Parameter Category (Add Category)

Hey guys,

It’s been a while. I’m looking at possibilities to add/ modify existing project parameter through dynamo or python? Is that possible?

Thank you in Advance.

This thread probably has the information you need.

Joe

thanks joe, but i cant see anything about modifying project parameters category, they’re more of shared parameters

I believe that the “Parameter.CreateProjectParameter” node can be used applying the same methodology in the post I referenced.

Joe

yup that should pretty straight forward but what im looking for is if i already have project parameter say parameter 1 and assigned to door category, i want to modify it and add more category

1 Like

Has anyone resolved this issue?
I am also struggling to find any information about how to add categories to existing project parameters. I am assuming that it involves a python script because there do not appear to be any OOTB modules that allow any of the information associated with project parameters to be pushed back into the Revit file.

I would be interested in a solution as well!

No luck here either.

I’ve had success using the data|shapes node “Add Shared Parameter(s) from txt” to add a shared parameters to a project. But once the shared parameters are made I have had no luck modifying the Categories of the shared parameter using Dynamo.

Out of curiosity I made two instances of a shared parameter in two different Revit files, File A & File B, with each shared parameter instance, Instance A & Instance B, set to different categories. Then I made Schedule A using Instance A in File A. When Schedule A was inserted into File B shared parameter Instance B updated itself to reflect the categories of Instance A.

So, Revit handles the update of shared parameters in an automated fashion. The logic must exist to update parameters but I don’t know how to access it using OOTB and more commonly known packages. It would be nice to have something like a “Modify Shared/Project Parameter” node but my Revit mojo isn’t strong enough to pull it off.

How about a comment from the big dogs of the Dynamo community? Is there a package out there that we’re missing?

Regards,
Jake

You will need to use ReInsert instead of Insert for the bindings that are already exist.
if its not exist yet the ReInsert doesn’t work.

When you use ReInsert you have to include the new categories you want to add with the categories that already been added otherwise the parameters and its values will be deleted from the categories that are already exist in the binding.

for b in bool:
  	if b == True:
  		bind.append(app.Create.NewInstanceBinding(catset))	
  	else : 
  		bind.append(app.Create.NewTypeBinding(catset))
  #parameters aan de project toevoegen
  bindmap = doc.ParameterBindings
  for p,b,g in zip(parameters,bind,group):
  	try:
  		bindmap.ReInsert(p, b, g)
  		i += 1
  	except:
  		continue