AutoCAD 2010/2011/2012 DWG Format
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Problem with SSGET when filtering string content
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi all,
I don;t know what the *** happen with this piece of code, I have checked it a million of times and seems to be well done. I'm trying to filter a previous selection and select Text or Mtext objects that are in the layer COTREF, and that contain the strings "%%c" AND "L" at the same time. The problem is that the code it's not selecting objects with the "L" included.
Here's the code:
(setq grupo1 (ssget "" '((0 . "TEXT,MTEXT")(8 . "COTREF")(-4 . "<AND")(1 . "*%%c*")(1 . "*L*")(-4 . "AND>"))))
The most unreasonable thing it's that I have 2 text objects exactly the same and when using this filter codes just one object it's selected (cyan cloud), check included DWG file.
Any idea ?????
I'v been searching abouit it and seems some persons are having problems with ssget filters in the newer versions of AutoCAD, I'm using 2012. I'm also suspecting fo the caracter "%" which could be working as a wild-card, but as far as I know it is not.
Thanks for any help about it.
Solved! Go to Solution.
Re: Problem with SSGET when filtering string content
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
This selects some:
(command "change" (ssget '((0 . "TEXT,MTEXT")(8 . "COTREF")(-4 . "<AND")(1 . "*%%c*")(1 . "*L*")(-4 . "AND>")))"" "p" "c" "1" "")
This selects the rest:
(command "change" (ssget '((0 . "TEXT,MTEXT")(8 . "COTREF")(-4 . "<AND")(1 . "*%%C*")(1 . "*L*")(-4 . "AND>")))"" "p" "c" "1" "")
Can you spot the difference?
Re: Problem with SSGET when filtering string content
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Man, you are a genious !!!!
Thanks so much for take your time and help me, so simple now that I understand it ...
Regards
Re: Problem with SSGET when filtering string content
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You're welcome. Be sure to mark the post that worked with "accept solution"
