Implementing a schematic layout algorithm and its layout property page


Purpose
This sample shows a customized schematic layout algorithm implementation. Schematics handles the customized algorithm in the same way as a standard algorithm. The customized implementation of ISchematicAlgorithm can be added to the Layout Task drop-down list and applied from the Apply Layout button in the same way as any standard algorithm. Implementing a new IPropertyPage provides access to your custom layout algorithm's parameters.
 
This sample creates a schematic layout algorithm (named TranslateTree) that translates a set of connected schematic features starting from a selected node according to given X and Y translation factors. The Apply Layout Task button is available for the algorithm only when a single node is currently selected in the active diagram.

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 in Visual Studio and build the project.
  2. Start ArcMap.
  3. Open a schematic diagram and start an edit session on the diagram.
  4. Click the Edit/Move Schematic Features tool on the Schematic Editor toolbar and select an only schematic node in the active diagram.
  5. Select Translate Tree in the language you're using (C# or VB .NET) from the Layout Task drop-down list.
  6. Click Layout Algorithm Properties to edit and modify the Translate Tree properties (X and Y translation factors) if needed.
  7. Click OK.
  8. Click Apply Layout Task.

TranslateTreePropPage.cs Implementation for the custom algorithm's property page.
ITranslateTree.cs Custom algorithm properties.
TranslateTree.cs Implementation for the custom algorithm.
ApplicativeAlgorithmsCS2008.csproj Project file for the Translate Tree custom algorithm and its property page.
ApplicativeAlgorithmsCS2008.sln C# solution.
Download the C# files
TranslateTreePropPage.vb Implementation for the custom algorithm's property page.
ITranslateTree.vb Custom algorithm properties.
TranslateTree.vb Implementation for the custom algorithm.
ApplicativeAlgorithmsVBNet2008.vbproj Project file for the Translate Tree custom algorithm and its property page.
ApplicativeAlgorithmsVBNet2008.sln VB .NET solution.
Download the VB.NET files

Download the files for all languages

See Also:

ISchematicAlgorithm interface
ISchematicAlgorithmEventsTrigger interface
ISchematicAnalystFindConnected interface
ISchematicInMemoryDiagram interface
ISchematicInMemoryFeature interface




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