Implementing a schematic rule and its property page


Purpose
Schematic rules are executed during schematic diagram generation and update. Several schematic rules are provided with this version, for example, the Node Reduction By Priority rule, Relationship rule, and so on. You can also develop your own custom schematic rule. Schematics treats this custom rule the same as the standard rules. To create a custom rule, implement new ISchematicRule and ISchematicRuleDesign interfaces. To create the associated property page, implement the IComPropertyPage interface.
 
By registering your customized component on your machine (with esriRegasm.exe), the new custom rule and its related property page is automatically available from any diagram template's Rules tab in the Schematic Dataset Editor and ready to be configured to execute during any schematic diagram generation and update process.
 
This sample details a customized schematic rule implementation. The goal of this sample is not in the rule, but how to implement it. The purpose is to create a schematic rule (in this sample, Reduce Schematic Links) that reduces schematic links, implemented by a specific schematic feature class, when two or more links have the same extremity nodes (and optionally, connect at the same port on these extremity nodes).

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open the solution file and build the project. Note that this step is automatically registering the component.
  2. Start ArcCatalog.
  3. Browse to any geodatabase that contains a schematic dataset.
  4. Right-click this schematic dataset entry and select Edit. The Schematic Dataset Editor starts.
  5. Select any diagram template entry that works with the Standard builder or create a diagram template that works with the Standard builder.
  6. Click the Rules tab.
  7. Click Add Rule on the Rules tab toolbar.
  8. Select the new custom rule from the Type drop-down list (that is, select Reduction Link Rule VBNet or Reduction Link Rule C#).
  9. Click Rule Properties on the Rules tab toolbar. The custom rule properties page appears.
  10. Select the link schematic feature class (that implements the schematic links that will be automatically reduced during the rule execution) in the Link to reduce drop-down list.
  11. Select the Use Port check box if your schematic links connect to a specific port at their extremity nodes and you want the rule to take these port connections into account during its execution.
  12. Click Save to save the schematic dataset's new parameters.
  13. Start ArcMap and generate or update a schematic diagram from the diagram template (which definition has been just modified); the custom rule will be executed.

ReductionLinkRule.vb Implementation for the custom rule.
frmReductionLink.vb Form for the custom rule property page.
frmReductionLink.Designer.vb Form for the custom rule property page.
ReductionLinkPropertyPage.vb Implementation for the custom rule's property page.
Download the VB.NET files
ReductionLinkRule.cs Implementation for the custom rule.
frmReductionLink.cs Form for the custom rule property page.
frmReductionLink.Designer.cs Form for the custom rule property page.
ReductionLinkPropertyPage.cs Implementation for the custom rule's property page.
Download the C# files

Download the files for all languages

See Also:

ISchematicRule interface
ISchematicRuleDesign interface




Development licensing Deployment licensing
ArcView: Schematics ArcView: Schematics
ArcEditor: Schematics ArcEditor: Schematics
ArcInfo: Schematics ArcInfo: Schematics