Using ArcGIS Pro 3.2 - there's a button on the attribute table UI that allows the user to copy selected records and paste them to the clipboard. I would like to capture that record array, serialize it, and send it to an external website. I've found methods in the SDK to get the selected object IDs or row indices, but nothing after that. My guess is absent of a method that allows me to grab the selection and use it, I have to query the feature layer/table using the collected IDs/indices and put the results in an array for further use.
Solved! Go to Solution.
You can enumerate the selected records using Selection.Search()
//Enumerate over the selected features
using (var rc = selection.Search())
{
while (rc.MoveNext())
{
using (var feature = rc.Current as Feature)
{
var oid = feature.GetObjectID();
//etc.
}
}
}
You can enumerate the selected records using Selection.Search()
//Enumerate over the selected features
using (var rc = selection.Search())
{
while (rc.MoveNext())
{
using (var feature = rc.Current as Feature)
{
var oid = feature.GetObjectID();
//etc.
}
}
}