Hello everyone. I don't have much experience with Revit API, so I confused with parameters.
In our project we have shared parameter (type - Length) for structural framing which we use to get absolute elevation in Tags.
This parameter also is a parameter of type in family of structural framing.
I wanted to set the value of this shared parameter in type with LookUp, but I've understood that it doesn't work.
Please help or give advice, how can I get and set shared parameter of type?
Solved! Go to Solution.
Hello everyone. I don't have much experience with Revit API, so I confused with parameters.
In our project we have shared parameter (type - Length) for structural framing which we use to get absolute elevation in Tags.
This parameter also is a parameter of type in family of structural framing.
I wanted to set the value of this shared parameter in type with LookUp, but I've understood that it doesn't work.
Please help or give advice, how can I get and set shared parameter of type?
Solved! Go to Solution.
Solved by antoine_ferron. Go to Solution.
Hi,
You have to retrieve the FamilySymbol of your familyInstance to get and set a parameter of type look at the code below :
FamilySymbol familySymbol = familyInstance.Symbol; //familyInstance is one instance of your Structural Framing
using (Transaction ts = new Transaction(doc, "Change value of parameter"))
{
ts.Start();
familySymbol.LookupParameter("NameOfYourParameter").Set(TheNewValue);
ts.Commit();
}
Hi,
You have to retrieve the FamilySymbol of your familyInstance to get and set a parameter of type look at the code below :
FamilySymbol familySymbol = familyInstance.Symbol; //familyInstance is one instance of your Structural Framing
using (Transaction ts = new Transaction(doc, "Change value of parameter"))
{
ts.Start();
familySymbol.LookupParameter("NameOfYourParameter").Set(TheNewValue);
ts.Commit();
}
Thank you, your idea and code helped me
Thank you, your idea and code helped me
Can't find what you're looking for? Ask the community or share your knowledge.