feature name

feature name

peterquRXR7S
Advocate Advocate
289 Views
2 Replies
Message 1 of 3

feature name

peterquRXR7S
Advocate
Advocate

One feature has four holes. I selected two of them. How do I figure out their names? I know I can export them, then open the file and read the names. But is there a better way?

 

peterquRXR7S_0-1702570857406.png

 

0 Likes
290 Views
2 Replies
Replies (2)
Message 2 of 3

icse
Advisor
Advisor

tbh not a 'better' solution but a diffrent one:

 

 

 

//check if anything is selected
if not entity_exists(entity('featureset','')) or number_selected(entity('featureset','')) <= 0 {
	return
}

//stores the current featureset
entity $currentFs = entity('featureset','')

//copy and the selected features into a new fs then activate the new one
copy featureset ; selected
activate featureset #

//extract the names into a string list
string list $selectedFSNames = extract(components(entity('featureset','')),'Name')

//remove the temp featureset
purge featureset ; yes

//activate the original featureset
activate featureset ${currentFs.Name}

//loop throgh the fs names and activate the features to restore original state
foreach $f in $selectedFSNames {
	edit featureset ; select ${f}
}

 

 

 

this is probably slow with large featuresets, maby you should consider to remove the foreach loop at the end

if you don't need to restore the original state.

 

A Property like (BOOL)IsSelected would be gold here....

 

Message 3 of 3

peterquRXR7S
Advocate
Advocate

Thank you! It is better than my way.

0 Likes