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

FamilyParamValueString() статический приватный Метод

static private FamilyParamValueString ( FamilyType t, FamilyParameter fp, Document doc ) : string
t FamilyType
fp FamilyParameter
doc Document
Результат string
        static string FamilyParamValueString(
            FamilyType t,
            FamilyParameter fp,
            Document doc)
        {
            string value = t.AsValueString( fp );
              switch( fp.StorageType )
              {
            case StorageType.Double:
              value = Util.RealString(
            (double) t.AsDouble( fp ) )
            + " (double)";
              break;

            case StorageType.ElementId:
              ElementId id = t.AsElementId( fp );
              Element e = doc.GetElement( id );
              value = id.IntegerValue.ToString() + " ("
            + Util.ElementDescription( e ) + ")";
              break;

            case StorageType.Integer:
              value = t.AsInteger( fp ).ToString()
            + " (int)";
              break;

            case StorageType.String:
              value = "'" + t.AsString( fp )
            + "' (string)";
              break;
              }
              return value;
        }