ArcObjects Library Reference (GeoDatabase)  

ITopologyContainer2.CreateTopologyEx Method

Creates a new topology.

[Visual Basic .NET]
Public Function CreateTopologyEx ( _
    ByVal Name As String, _
    ByVal ClusterTolerance As Double, _
    ByVal ZClusterTolerance As Double, _
    ByVal maxGeneratedErrorCount As Integer, _
    ByVal ConfigurationKeyword As String _
) As ITopology
[C#]
public ITopology CreateTopologyEx (
    string Name,
    double ClusterTolerance,
    double ZClusterTolerance,
    int maxGeneratedErrorCount,
    string ConfigurationKeyword
);
[C++]
HRESULT CreateTopologyEx(
  BSTR Name,
  double ClusterTolerance,
  double ZClusterTolerance,
  long maxGeneratedErrorCount,
  BSTR ConfigurationKeyword,
  ITopology** Topology
);
[C++]

Parameters

Name [in]   Name is a parameter of type BSTR ClusterTolerance [in]   ClusterTolerance is a parameter of type double ZClusterTolerance [in]   ZClusterTolerance is a parameter of type double maxGeneratedErrorCount [in]   maxGeneratedErrorCount is a parameter of type long ConfigurationKeyword [in]   ConfigurationKeyword is a parameter of type BSTR Topology [out, retval]

  Topology is a parameter of type ITopology

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Errors Returned

FDO_E_Z_CLUSTER_TOLERANCE_NOT_SUPPORTED_IN_RELEASE - When using CreateTopologyEx to create a topology in a pre-9.0 geodatabase and supplying a ZClusterTolerance other than -1.

Remarks

The CreateTopologyEx method creates a topology with the specified name, cluster tolerance, maximum allowable number of errors to be generated, Z cluster tolerance and for ArcSDE, with the supplied configuration keyword. When a topology is initially created, it is empty with no participating feature classes or rules.

The ITopologyContainer::DefaultClusterTolerance property should be used to return the default or recommended cluster tolerance for a topology. The ITopologyContainer::MaximumClusterTolerance property can be used to return the maximum cluster tolerance for a topology. You cannot specify a cluster tolerance larger than the maximum or smaller than the minimum or default cluster tolerance. As such, if the specified cluster tolerance is less than the DefaultClusterTolerance for the feature dataset, then the Topology will be created with the default cluster tolerance value. If the specified cluster tolerance is larger than the MaximumClusterTolerance, the topology will be created with the maximum cluster tolerance.

The maxGeneratedErrorCount parameter specifies the maximum number of errors validate will generate before stopping.  Setting a value of -1 indicates there is no limit to the number of errors that will be generated.

The configurationKeyword parameter allows the application to control the physical layout for this table in the underlying RDBMSfor example, in the case of an Oracle database, the configuration keyword controls the tablespace in which the table is created, the initial and next extents, and other properties. The configurationKeywords for an ArcSDE instance are set up by the ArcSDE data administrator, the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfiguration interface. The configurationKeyword parameter is not mandatory when building a topology in an ArcSDE Geodatabase, an empty string can be specified, in which case the topology will be built using the default configuration. For more information on configuration keywords, refer to the ArcSDE documentation.

The ITopologyContainer2::DefaultZClusterTolerance property can be used to return the default Z cluster tolerance. The default Z cluster tolerance for all topologies is 0, indicating that the topology will support the Building model. The ITopologyContainer2::MaximumZClusterTolerance property can be used to return the maximum Z cluster tolerance for a topology. The maximum Z cluster tolerance will be equal to the maximum Z - minimum Z of the spatial domain from the feature dataset. Supplying a Z cluster tolerance value greater than 0 will create a topology that supports the Terrain model.

You cannot specify a Z cluster tolerance larger than the maximum or smaller than the minimum or default Z cluster tolerance. As such, if the specified Z cluster tolerance is less than the DefaultZClusterTolerance for the feature dataset, then the topology will be created with the default Z cluster tolerance value. If the specified Z cluster tolerance is larger than the MaximumZClusterTolerance , the topology will be created with the maximum Z cluster tolerance.

When using the CreateTopologyEx method to create a topology within a geodatabase that does not support Z cluster tolerances (geodatabases created pre-9.0), the ZClusterTolerance should be set to -1.

See Also

ITopologyContainer2 Interface

.NET Related Topics

Creating a topology in the geodatabase |