Selection not staying selected in custom script tool

387
2
03-01-2020 11:01 AM
zx
by
New Contributor II

Hello,

I'm building a SQL select from a csv that is given by a user, after building the statement and passing it to a table (connected to feature classes with relationship classes in a FGDB, I have "Select Related Features" turned on) the highlighting in the map pane flashes but does not stay selected... is this a bug or am I doing something wrong? 

code:

thanks in advance!!

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

Select Layer By Attribute—Data Management toolbox | Documentation 

the selection returns a featurelayer, what do you want to do with it?

The code example at the bottom shows you can use Copy to save the selection to a new featureclass

zx
by
New Contributor II

I was trying to make it easy to visualize the spatial attributes of the data when an associate had a large list of items in a csv. I just want the features to be highlighted in the map pane so that they don't have to make a select by attribute each time manually. Do you think that their is a better way to go about it? 

Thanks so much for responding. 

0 Kudos