本文整理汇总了C#中ExporterIFC.SetMaterialIdForCurrentExportState方法的典型用法代码示例。如果您正苦于以下问题:C# ExporterIFC.SetMaterialIdForCurrentExportState方法的具体用法?C# ExporterIFC.SetMaterialIdForCurrentExportState怎么用?C# ExporterIFC.SetMaterialIdForCurrentExportState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExporterIFC
的用法示例。
在下文中一共展示了ExporterIFC.SetMaterialIdForCurrentExportState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetBestMaterialIdInExporter
/// <summary>
/// Sets best material id for current export state.
/// </summary>
/// <param name="geometryObject">The geometry object to get the best material id.</param>
/// <param name="exporterIFC">The ExporterIFC object.</param>
public static void SetBestMaterialIdInExporter(GeometryObject geometryObject, ExporterIFC exporterIFC)
{
ElementId materialId = GetBestMaterialIdForGeometry(geometryObject, exporterIFC);
if (materialId != ElementId.InvalidElementId)
exporterIFC.SetMaterialIdForCurrentExportState(materialId);
}
示例2: SetBestMaterialIdInExporter
/// <summary>
/// Sets best material id for current export state.
/// </summary>
/// <param name="geometryObject">The geometry object to get the best material id.</param>
/// <param name="element">The element to get its structual material if no material found in its geometry.</param>
/// <param name="overrideMaterialId">The material id to override the one gets from geometry object.</param>
/// <param name="exporterIFC">The ExporterIFC object.</param>
/// <returns>The material id.</returns>
public static ElementId SetBestMaterialIdInExporter(GeometryObject geometryObject, Element element, ElementId overrideMaterialId, ExporterIFC exporterIFC)
{
ElementId materialId = overrideMaterialId != ElementId.InvalidElementId ? overrideMaterialId :
GetBestMaterialIdFromGeometryOrParameter(geometryObject, exporterIFC, element);
if (materialId != ElementId.InvalidElementId)
exporterIFC.SetMaterialIdForCurrentExportState(materialId);
return materialId;
}