Jump to content
bcarlso2

Count Occurrences of Specific String

Recommended Posts

bcarlso2

I am trying to script a counter of specific strings. How can I select all occurrences of text that has a specific value? I cannot use filter or quickselect, and I cannot get selection sets to find specified values. Any help would be greatly appreciated. I am using ACADE 2015.

Share this post


Link to post
Share on other sites
BIGAL

You are incorrect about using selection sets, just make a selection set of text or mtext then look at each string using (wcmatch txtstring "your string*") it will return T true if it matches.

Share this post


Link to post
Share on other sites
Dadgad

I don't understand why you are unable to use Filter, how about using FIND & REPLACE, just for the search functionality?

Share this post


Link to post
Share on other sites
tombu
I don't understand why you are unable to use Filter, how about using FIND & REPLACE, just for the search functionality?

 

The Filter command was how I learned to do it a quarter century ago. We have many selection options now, but Filter will always be on my list.

Share this post


Link to post
Share on other sites
bcarlso2
You are incorrect about using selection sets, just make a selection set of text or mtext then look at each string using (wcmatch txtstring "your string*") it will return T true if it matches.

 

I found a way to do it. I ended up finding the dxf group codes I needed to specify the contents with ssget.

Share this post


Link to post
Share on other sites
bcarlso2
I don't understand why you are unable to use Filter, how about using FIND & REPLACE, just for the search functionality?

 

It uses a popup window, therefore it cannot be scripted how I need it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×