本文整理汇总了C#中FamilySymbol.get_Parameter方法的典型用法代码示例。如果您正苦于以下问题:C# FamilySymbol.get_Parameter方法的具体用法?C# FamilySymbol.get_Parameter怎么用?C# FamilySymbol.get_Parameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FamilySymbol
的用法示例。
在下文中一共展示了FamilySymbol.get_Parameter方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getNumLamps
private string getNumLamps(FamilySymbol fs)
{
if (fs.get_Parameter("Number of Lamps") != null)
{
return fs.get_Parameter("Number of Lamps").ToString();
}
else
{
// TODO:
// Parse from IES file
var file = fs.get_Parameter(BuiltInParameter.FBX_LIGHT_PHOTOMETRIC_FILE);
return "1"; //for now
}
}
示例2: getParam
private static FScheme.Value getParam(FamilySymbol fi, string paramName)
{
var p = fi.get_Parameter(paramName);
if (p != null)
{
return _getParam(fi, p);
}
throw new Exception("Parameter \"" + paramName + "\" was not found!");
}
示例3: setParam
private static FScheme.Value setParam(FamilySymbol fi, Definition paramDef, FScheme.Value valueExpr)
{
var p = fi.get_Parameter(paramDef);
if (p != null)
{
return _setParam(fi, p, valueExpr);
}
throw new Exception("Parameter \"" + paramDef.Name + "\" was not found!");
}
示例4: setParam
private static Expression setParam(FamilySymbol fi, string paramName, Expression valueExpr)
{
var p = fi.get_Parameter(paramName);
if (p != null)
{
return _setParam(fi, p, valueExpr);
}
throw new Exception("Parameter \"" + paramName + "\" was not found!");
}
示例5: getParam
private static Expression getParam(FamilySymbol fi, Definition paramDef)
{
var p = fi.get_Parameter(paramDef);
if (p != null)
{
return _getParam(fi, p);
}
throw new Exception("Parameter \"" + paramDef.Name + "\" was not found!");
}
示例6: UpdateFamilySymbolType
public void UpdateFamilySymbolType(FamilySymbol symbol, ExportedDataType dataType)
{
var defFile = CreateOrGetSharedOptionsFile();
using (var trans = new Transaction(m_revitDoc.Document,"addParams"))
{
trans.Start();
foreach (var field in dataType.Fields)
{
var param = symbol.get_Parameter(field.Name);
if (param == null)
{
CreateAndBindParam(defFile,symbol.Category, field.Name);
param = symbol.get_Parameter(field.Name);
}
param.Set(field.Value);
}
trans.Commit();
}
}