Message 1 of 3
Set a shared project parameter remains not assigned
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm encountering a problem setting the value of a shared project parameter.
I added a shared project parameter using SharedParameters.RawCreateProjectFromExistingSharedParameter(), now I want to set its value.
The code runs without any issue (debugging the code it finds the parameter and appearently set it), but the parameter value in revit remains not assigned ... any idea to solve this issue? If I try the same code in a revit macro, everything works fine and the value is set. Here is my code, the parameter type is double.
using (Transaction t = new Transaction(myDoc, "setParameter")) { t.Start(); Element myPanel = myDoc.GetElement(panelId); Panel myPan = myPanel as Panel; //Parameter myParameter= myPan.LookupParameter("myParameterName"); var pa = myPan.GetParameters("myParameterName"); var myParameter= pa.First(); myParameter.Set(11); t.Commit(); }
Thanks!