cannot set Type parameter of newly created Type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In my code I create a new Type / Symbol of a Family.
This works as expected and I subsequently create an Instance of that new Symbol.
I then attempt to set some parameters for this new Instanc3.
If the parameter is an Instance parameter then I can set the parameter value and Revit will store it.
If the parameter is a Type parameter (I go to instance.Symbol.LookupParameter("") for finding it)
then I can set the parameter value, Revit will acknowledge the new value without error message or exception.
However, if I look at the value the parameter, either immediately after, or when the transaction is committed, Revit returns the old value, not the new.
To make things even more confusing. If I start a new command that makes the exact same changes to the parameter values, using the same code, it will actually change the value.
I already attempted to commit the transaction between creating the type and instance and re-starting it before changing the parameter values.
I also attempted to put the code to change the parameter values in an external event, to maximise the chance that Revit actually finished its process of fully creating and initialising the new Type, but that did not solve the issue either.
I have to start a new command before I am able to modify Type parameters in a FamilySymbol that was just created. This is obviously highly undesirable, but I cannot find any answer to a similar question, nor any mention of a method that has to be called to finalise the creation of a new Type/Symbol definition so that its parameters can actually be modified
Thanks in advance to any answer that helps me get around this particular issue.