Object Editing

Plugin Introduction:

This sample is used to clean overshoot and extend undershoot. The operation line and reference line can be in different layers.

Control/Object/Interface:

Control/Object/Interface Properties Methods
Plugin   Initialize(), ExitInstance()
CtrlAction FormClass Run()
Application ActiveApplication, Output  
IFormMain FormManager  
IFormMap MapControl  
MapControl Map  
Map Workspace FindSelection(), Refresh()
Selection Dataset ToRecordset()
Recordset   GetID(), GetGeometry(), Close(), Dispose(), MoveFirst(), Edit(), SetGeometry(), Update()
Geometrist   IntersectLine(), IsPointOnLine()
DatasetVector   Query()

Basic Steps:

  1. Open ObjectEditing.sln in the SuperMap Deskpro .NET\SampleCode\ObjectEditing folder with Microsoft Visual Studio 2008 and compile it.
  2. When succeeded, you can find two files generated: SuperMap.Desktop.ObjectEditing.dll located in the SuperMap iDesktop 8C\Bin\Plugins\ObjectEditing folder and SuperMap.Desktop.ObjectEditing.config located in the SuperMap iDesktop 8C\WorkEnvironment\Default folder.
  3. Copy the SampleIcons folder from the SuperMap iDesktop 8C\SampleCode folder to SuperMap iDesktop 8C\SampleCode\Resources.
  4. Start SuperMap iDesktop 8C.
  5. Open TopoProcessing.udb provided in the SuperMap iDesktop 8C\SampleData\SampleCodeUsed folder. When you open the LineEditing dataset, you will see the Topology Processing tab.
  6. Set the LineEditing layer editable.
  7. On the Topology Processing tab, in the Line Topology group, click the Extend Undershoot button.

    1) Determine the operation line and the reference line. The operation line will be extended to the reference line.

    2) Select the reference line.

    3) Select the operation line you want to extend.

    4) The operation line extends to the reference line.

  8. On the Topology Processing tab, in the Line Topology group, click the Clean Overshoot button.

    1) Determine the operation line and the reference line. If the two lines intersect, they are split at the intersection. The shorter part of the operation line will be removed.

    2) Select the reference line.

    3) Select the operation line.

    4) The operation line is split into two parts at the intersection with the reference line and the shorter part of the reference line is removed.

Data:

SuperMap iDesktop 8C\SampleData\SampleCodeUsed\TopoProcessing.udb.

Note:

When you successfully compile ObjectEditing.sln, SuperMap.Desktop.ObjectEditing.dll and SuperMap.Desktop.ObjectEditing.config will be generated and copied to SuperMap iDesktop 8C\Bin\Plugins\ObjectEditing and SuperMap iDesktop 8C\WorkEnvironment\Default respectively. Each time you start SuperMap iDesktop 8C, the ObjectEditing plugin will be loaded.

If you want to remove the ObjectEditing plugin from SuperMap iDesktop 8C, you only need to delete SuperMap.Desktop.ObjectEditing.config in the SuperMap iDesktop 8C\WorkEnvironment\Default folder.