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.
 
Caution: If you plan to implement a custom schematic rule to be executed via a client-server application, the solution must implement two projects; one for the custom rule property page and the other for the custom rule execution itself. The component dedicated to the custom rule execution will have to be registered with the ArcGIS server to be used on any client-server application.
 
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 components.
  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.
CustomRulesVBNet2010.vbproj Project file for the custom rule code.
ReductionLinkPropertyPage.vb Implementation for the custom rule's property page.
frmReductionLink.vb Custom rule's property page.
frmReductionLink.Designer.vb Custom rule's property page.
CustomRulesPageVBNet2010.vbproj Project file for the custom rule's property page code.
Download the VB.NET files
ReductionLinkRule.cs Implementation for the custom rule.
CustomRulesCS2010.csproj Project file for the custom rule code.
ReductionLinkPropertyPage.cs Implementation for the custom rule's property page.
frmReductionLink.cs Custom rule's property page.
frmReductionLink.Designer.cs Custom rule's property page.
CustomRulesPageCS2010.csproj Project file for the custom rule's property page code.
Download the C# files

Download the files for all languages

See Also:

ISchematicRule interface
ISchematicRuleDesign interface




Development licensing Deployment licensing
ArcGIS for Desktop Basic: Schematics ArcGIS for Desktop Basic: Schematics
ArcGIS for Desktop Standard: Schematics ArcGIS for Desktop Standard: Schematics
ArcGIS for Desktop Advanced: Schematics ArcGIS for Desktop Advanced: Schematics