Loading multiple features into the inspector

62
1
Jump to solution
05-08-2019 12:17 PM
Highlighted
New Contributor III

I'm attempting to decrease the performance time for ArcPro. A bit of code I am currently looking at is 

   foreach (long oid in oidList) {

      var inspector = new Inspector();

      inspector.Load(lyr.Value, oid);

      Node nd = new Node();

      Geometry geo = inspector.Shape;

      MapPoint pt = geo as MapPoint;

      nd.Lat = (float)pt.Y;

....

}

I was attempting to do:

   var inspector = new inspector;

   inspector.Load (lyr.Value, oidList); 

but then the inspector.Shape is null. Is there a way to load all of the oidList at once and still get to Shapes or should we just use rowcursors or something else? This for loop is taking almost 2 minutes on a small layer of 5600 nodes so I am dreading what will happen when we use the larger layers that the users will use.

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Regular Contributor

Susan,

Using row cursors instead of the inspector class will almost certainly be faster when retrieving the shape for a large number of features. You cant bulk load the inspector get the individual shapes at this time.

In a future release we'll have a quicker method for getting/setting the shape value.

View solution in original post

1 Reply
Highlighted
Esri Regular Contributor

Susan,

Using row cursors instead of the inspector class will almost certainly be faster when retrieving the shape for a large number of features. You cant bulk load the inspector get the individual shapes at this time.

In a future release we'll have a quicker method for getting/setting the shape value.

View solution in original post