Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

ISimpleJunction

$
0
0
I want to run this sample code just to manage the edges of a selected feature (junctionFeature)...

Code:

// Assume we already have a pointer to a junction feature.
ISimpleJunctionFeature simplejunctionFeature = junctionFeature;
IEdgeFeature edgeFeature;
IRow row;

for(int i = 0; i < simplejunctionFeature.EdgeFeatureCount; i++)
{
    edgeFeature = simplejunctionFeature.get_EdgeFeature(i);
    row = (IRow)edgeFeature;
    Console.WriteLine("EdgeFeature " + i + " has OID of: " + row.OID);
}

Well, first Im trying another code.

I have an IFeature selected . I have notice that when I hit a breakpoint for debbuging the FeatureType property of this element is esriFTSimpleJunction.

The code is this:


Code:

try
                {
                    ISimpleJunctionFeature junction = firstSelectedFeature as ISimpleJunctionFeature; //firstSelectedFeature is my IFeature

                    staticUtilities.writeToDockableWindowJon(junction.EdgeFeatureCount.ToString()); //this just writes in my dockable window textbox...
               
                }
                catch (Exception ex)
               
                {

                    staticUtilities.writeToDockableWindowJon(ex.ToString()); //this just writes in my dockable window textbox...
                }



The error is this:

System.Runtime.InteropServices.COMException (0x80004005): Error no especificado (Excepción de HRESULT: 0x80004005 (E_FAIL))
en ESRI.ArcGIS.Geodatabase.ISimpleJunctionFeature.get_EdgeFeatureCount()...

Pleas help!!!

Thans in advance

Jon

Viewing all articles
Browse latest Browse all 1374

Trending Articles