Align Marker To Stroke Or Fill (Cartography)
Align the representation marker symbols of a point feature class to the nearest stroke or fill representation symbols in a line or polygon feature class within a specified search distance.
Representation marker symbols are aligned by overriding the angle property of representation marker symbol layer.
The search distance is the measurement from the graphical edge of the marker to the graphical edge of the nearest stroke or fill outline. Representation geometry (shape) overrides are honored. Representation markers beyond the search distance will not be rotated. A search distance of zero aligns only markers that are coincident to a representation stroke or fill symbol.
Features that have null or invalid representation rules, or that have the representation visibility property off, will not be aligned.
Rotating markers may introduce graphic conflicts. The Detect Graphic Conflict tool can be used to identify these areas.
The input point feature layer containing marker representations.
The input line or polygon feature layer containing stroke or fill representations.
The search distance from graphical marker edge to graphical stroke edge. A distance greater than or equal to zero must be specified.
Specifies the representation marker orientation relative to the stroke or fill edge.
This stand-alone script shows an example of using the AlignMarkerToStrokeOrFill tool.
import arcpy from arcpy import env env.workspace = "C:/data" env.referenceScale = "50000" arcpy.AlignMarkerToStrokeOrFill_cartography("buildings.lyr", "roads.lyr", "2 Points", "PERPENDICULAR")
This stand-alone script shows an example of using the AlignMarkerToStrokeOrFilltool.
# Name: AlignMarkerToStrokeOrFill_standalone_script.py # Description: Aligns representation markers to nearby line or polygon features symbolized with representations # Import system modules import arcpy from arcpy import env # Set environment settings env.workspace = "C:/data" env.referenceScale = "50000" # Set local variables in_point_features = "buildings.lyr" in_line_or_polygon_features = "roads.lyr" search_distance = "2 Points" marker_orientation = "PERPENDICULAR" # Execute Align Marker To Stroke Or Fill arcpy.AlignMarkerToStrokeOrFill_cartography(in_point_features, in_line_or_polygon_features, search_distance, marker_orientation)