Пример #1
0
 public static void SetParams(FamilyInstance _fi, Dictionary <string, ParameterEditRecorder> _params)
 {
     if (_params == null)
     {
         return;
     }
     foreach (var key in _params.Keys)
     {
         var p = _fi.GetParameterByUniqueIdOrByName(key);
         if (p != null)
         {
             var refP = _params[key];
             if (refP.StorageType == p.StorageType)
             {
                 if (p.IsReadOnly && p.Definition.Name == "洞口宽度")
                 {
                     //for a WIP version of envi fam
                     p = _fi.GetParameters("实际洞口宽度").First();
                 }
                 p.SetValue(refP.Value);
             }
         }
     }
 }