BuildingCoder.CmdFamilyParamValue.SetFamilyParameterValueFails C# (CSharp) Метод

SetFamilyParameterValueFails() публичный Метод

Non-working sample code for http://forums.autodesk.com/t5/revit-api/family-types-amp-shared-parameter-values/m-p/6218767
public SetFamilyParameterValueFails ( Document doc, string paramNameToAmend ) : void
doc Document
paramNameToAmend string
Результат void
        void SetFamilyParameterValueFails(
            Document doc,
            string paramNameToAmend)
        {
            FamilyManager mgr = doc.FamilyManager;
              FamilyTypeSet familyTypes = mgr.Types;
              FamilyTypeSetIterator familyTypeItor
            = familyTypes.ForwardIterator();
              familyTypeItor.Reset();
              while( familyTypeItor.MoveNext() )
              {
            FamilyParameter familyParam
              = mgr.get_Parameter( paramNameToAmend );

            if( familyParam != null )
            {
              FamilyType familyType = familyTypeItor.Current as FamilyType;
              Debug.Print( familyType.Name );
              mgr.Set( familyParam, 2 );
            }
              }
        }