- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
First thankyou in advance for any help that is provided but this issue has been causing me a problems for days. I am probably missing something very obvious but I just cannot see it!
First a little background I am using Revit 2016 and programming in C#.
My issue is I have a family (rfa} document in this instance it is a Furniture document in which I have a desk type with shared parameters. Further types of desk with varied size have been created using Family Types => New within the Family Types Dialog.
I can extract the parameters and the values for each of the desk types. However if I wish to change the value of a parameter I can only change the value for the desk type currently visible in the document.
I have tried code such as that below to iterate through the types but this still only works on the desk type currently visible and not the type current within the code.
FamilyTypeSet familyTyes = familyManager.Types;FamilyTypeSetIterator familyTypeItor = familyTyes.ForwardIterator();familyTypeItor.Reset();
while (familyTypeItor.MoveNext())
{
FamilyParameter familyParam = familyManager.get_Parameter(spNameAmend);
if (familyParam != null)
{
FamilyType familyType = familyTypeItor.Current as FamilyType;
MessageBox.Show(familyType.Name);
familyManager.Set(familyParam, 2);
}
}
What am I missing?
I was also wondering when adding a shared parameter via the API you can use
ExternalDefinitionCreationOptions option
This allows you to identify a number of binding options but is there an option for setting the parameter as
Reporting and IsDeterminedByFormula ?
Any help will be much appreciated
Solved! Go to Solution.