TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: mailmaverick on September 28, 2017, 10:03:32 AM

Title: SSGET Text Unformat
Post by: mailmaverick on September 28, 2017, 10:03:32 AM
Hi,

I want to make selection set of all Texts in Drawing Starting from Keyword kwrd .
I am using :
Code: [Select]
(ssget "_x" (list (cons 0 "*TEXT") (cons 1 (strcat kwrd "*"))))It does not select texts in which formatting codes such as /U /T etc are present in the beginning.
How to remove text formatting codes in ssget ?
Title: Re: SSGET Text Unformat
Post by: ronjonp on September 28, 2017, 10:14:40 AM
Code - Auto/Visual Lisp: [Select]
  1. (ssget "_x" (list '(0 . "*TEXT") (cons 1 (strcat "*" kwrd "*"))))
Title: Re: SSGET Text Unformat
Post by: mailmaverick on September 28, 2017, 10:32:23 AM
Thanks for prompt reply but it will select all texts containing other than formatting codes in the beginning.
For example i want that "{\\fArial Narrow|b1|i0|c0|p34;\\LD12}" must be selected but "dffDdfdf" should not be selected.

I want to select only those texts which either start from kword or start from 'formatting codes' followed directly by kword.
Title: Re: SSGET Text Unformat
Post by: ronjonp on September 28, 2017, 10:50:52 AM
Maybe:

Code - Auto/Visual Lisp: [Select]
  1. (ssget "_x"
  2.        (list '(0 . "*TEXT") (cons 1 (strcat kwrd "*,{\\*;" kwrd "*," kwrd "*,{\\*;\\*" kwrd "*")))
  3. )