CIMProceduralSymbolLayer Class
Represents a procedural symbol layer which defines rendering using script-based logic to construct complex 3D objects and textures from simple geometries. Properties of the symbol are derived from a rule package (.rpk file).
Snippet Mesh procedural texture symbol
/// <summary>
/// Creates Mesh procedural symbol with various textures.
/// 
/// </summary>
/// <remarks>Note: The rule package used in this method can be obtained from the Sample Data included in the arcgis-pro-sdk-community-samples repository.</remarks>
/// <returns></returns>
private static readonly string _rulePkgPath = @"C:\Data\RulePackages\MultipatchTextures.rpk";
public static Task<CIMMeshSymbol> CreateProceduralMeshSymbolAsync()
{
return QueuedTask.Run<CIMMeshSymbol>(() =>
{
CIMSymbolLayer[] proceduralSymbolLyr =
{
new CIMProceduralSymbolLayer()
{
PrimitiveName = "Textures",
RulePackage = _rulePkgPath,
RulePackageName = "Textures",
}
};
var myMeshSymbol = new CIMMeshSymbol()
{
SymbolLayers = proceduralSymbolLyr
};
return myMeshSymbol;
});
}
Snippet Procedural Symbol
/// <summary>
/// Create a procedural symbol that can be applied to a polygon building footprint layer
/// 
/// </summary>
/// <remarks>Note: The rule package used in this method can be obtained from the Sample Data included in the arcgis-pro-sdk-community-samples repository.</remarks>
private static readonly string _rulePkgPath = @"C:\Data\RulePackages\Venice_2014.rpk";
public static Task<CIMPolygonSymbol> CreateProceduralPolygonSymbolAsync()
{
return QueuedTask.Run<CIMPolygonSymbol>(() =>
{
//Polygon symbol to hold the procedural layer
var myPolygonSymbol = SymbolFactory.Instance.ConstructPolygonSymbol();
//Array of layers to hold a procedural symbol layer
CIMSymbolLayer[] proceduralSymbolLyr =
{
new CIMProceduralSymbolLayer()
{
PrimitiveName = "Venice Rule package 2014",
RulePackage = _rulePkgPath,
RulePackageName = "Venice_2014",
}
};
myPolygonSymbol.SymbolLayers = proceduralSymbolLyr;
return myPolygonSymbol;
});
}
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.