Adding parameters to selected elements

Adding parameters to selected elements

jordanmarr
Enthusiast Enthusiast
636 Views
3 Replies
Message 1 of 4

Adding parameters to selected elements

jordanmarr
Enthusiast
Enthusiast

I need to add a custom parameter to all currently selected elements.  Is this possible? 

 

0 Likes
637 Views
3 Replies
Replies (3)
Message 2 of 4

jordanmarr
Enthusiast
Enthusiast

Update:

 

I may have found a workable solution, which is to create a new shared parameter and bind it to my target types, as in the "BeamAndSlabNewParameter" example project.

 

This may suffice, although I envisioned adding it only to specific element instances, and not to all elements of a certain type.

I am very new to Revit, and I am learning it via code first (unfortunately); so maybe the way I originally imaged is not possible, and this is the best solution?

 

0 Likes
Message 3 of 4

ollikat
Collaborator
Collaborator

There is also function Application::NewInstanceBinding(CategorySet) which can be used to bind certain shared parameter to instances. But as you can see, this can be only used by category, not with specific element(s). I'm not sure, but I doubt the possibility to add parameter just for arbitary elements.

NewInstanceBinding
0 Likes
Message 4 of 4

jordanmarr
Enthusiast
Enthusiast

Ok, thanks!


@ollikat wrote:

There is also function Application::NewInstanceBinding(CategorySet) which can be used to bind certain shared parameter to instances. But as you can see, this can be only used by category, not with specific element(s). I'm not sure, but I doubt the possibility to add parameter just for arbitary elements.

NewInstanceBinding

 

0 Likes