I am creating and validating topology through vb.net and arcobject code.Things are running fine as I am able to add rule and validate it.

Problem is when once the program is run and topology is created. Second time when I am running my code, I have written that if topology exist then delete it and create new topology but I observed that deleting topology every time will corrupt memory.

So Second approach I used is to first delete rule in the existing topology and then featureclass from it and not the topology.

Then new rule and featureclasses are added to same existing topology. But the problem is I am not able to get the featureclass name in the existing topology. How can I get the name of feature class participated in topology?

The code is as follows-:

If pdataset.type=esridatasettype.featureclass then
    Dim fcnme as string
    Dim fcarray as Arraylist=New Arraylist
    for i as integer=0 to fcarray.count-1
        Dim gp as Geoprocessor=New geoprocessor
        Dim removefc as DataManagementTool.RemoveFeatureclassFromtopology=New DataManagementTool.RemoveFeatureclassFromtopology
        Dim sv as object=nothing
        Catch ex as exception
        end try

You are looking for the ITopologyProperties.Classes property.

  1. Use this sample code to get a reference to your topology.

  2. From your ITopology, get ITopologyProperties.

  3. Store ITopologyProperties.Classes in an IEnumFeatureClass.

  4. Use the sample code here to enumerate over your IEnumFeatureClass to get the feature class you want (since multiple feature classes may be in a single topology, you can get the name, type, etc. of each)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.