Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Formula: Copying and Paste within Family Types Properties

5 REPLIES 5
Reply
Message 1 of 6
ChrisFromNOLA
389 Views, 5 Replies

Formula: Copying and Paste within Family Types Properties

Here's what Im trying to accomplish.

I am trying to copy the text (Parameter Name) from the Parameter Group: Constraints that has a yes/no parameter associated with it, and paste the text (Parameter Name) into a designated field in the Parameter Group: Construction.

It seems to be a simple, "if box is checked then copy parameter name to this field,,,([>,< ])"

Just not sure how this should be written.

I would appreciate any help that moves me forward in understanding this.

 

Please see screenshots. Below...

Labels (1)
5 REPLIES 5
Message 2 of 6

Hi @ChrisFromNOLA ,

 

You can use Dynamic Model Updater in Revit API.

https://knowledge.autodesk.com/support/revit/learn-explore/caas/CloudHelp/cloudhelp/2014/ENU/Revit/f...  

 

Register an updater

UpdaterRegistry.AddTrigger(Updater.GetUpdaterId(),new ElementCategoryFilter(BuiltInCategory.OST_xxx), Element.GetChangeTypeParameter(yourParameter.Id));

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 3 of 6

This didn't solve the issue but I certainly appreciate your input. I also may not be explaining myself clear enough. Let me try explaining in annotated screenshots. Seems this is the best way to bring someone into my madness lol.

Message 4 of 6

Hi @ChrisFromNOLA ,

 

You have a Yes/No instance parameter and also you have a family type parameter. In this case, the family type parameter name is "Description"

By choosing Yes(tick mark symbol), you want to copy and set the Yes/No instance parameter definition name to the type parameter("Description").


By choosing No(removing tick symbol), you just want to delete the type parameter value("Description" value).


Is my understanding correct? Could you please confirm whether you are looking for this?


The thing to notice here is, Let's say we have 3 chair elements and all these 3 chair elements come from a particular element type. If you change the element type parameter for a single chair, all the chair's element type parameter values will be changed.


I'm waiting for your response.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 5 of 6

Thank you Naveen, Yes and No... By checking yes I would like the field to auto populate... Text only (Not dependent on the family for a yes/no family parameter. By checking No... simply does not copy text field

Message 6 of 6

Hi @ChrisFromNOLA ,

 

This may not be the exact solution to solve your issue.
But I hope this gives you an idea to handle this issue.

I did a small test using Wall Element.

In the wall element, we have a Yes/No Instance parameter called "Structural".
By choosing Yes/No, I am changing the type parameter(Cost).
This is just a sample code(Please do appropriate modifications to this code.)

If some parameter doesn't change while using IUpdater, please check by trying to change the parameter without using IUpdater.

If you are unable to resolve the issue, then let me know.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community