Jump to content

Count Occurrences of Specific String


bcarlso2

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...