russell84 Posted May 12, 2008 Posted May 12, 2008 just quickly does any one know of a lisp to filter text - i have recieved a massive survey and have to change all point numbers to a different layer - the point numbers are on the same layer as point heights. The only difference between the 2 is that every height has a decimal point - anyone know how to filter out the decimal point text?? Quote
russell84 Posted May 12, 2008 Author Posted May 12, 2008 I ended up using the properties quick select and used the TEXT - CONTENTS operator = * Wildcard match Value **.* Thanks anyways Quote
VovKa Posted May 12, 2008 Posted May 12, 2008 if someone needs a lisp without decimal point (ssget "_X" (list (cons 0 "TEXT") (cons 410 (getvar "CTAB")) (cons 1 "~*`.*")) ) with decimal point (ssget "_X" (list (cons 0 "TEXT") (cons 410 (getvar "CTAB")) (cons 1 "*`.*")) ) Quote
russell84 Posted May 13, 2008 Author Posted May 13, 2008 i'll definately be grabing that - very handy to know - thanks heaps:D Quote
asos2000 Posted August 14, 2008 Posted August 14, 2008 ussell84 could u tell how you doing that Quote
fixo Posted August 14, 2008 Posted August 14, 2008 if someone needs a lispwithout decimal point (ssget "_X" (list (cons 0 "TEXT") (cons 410 (getvar "CTAB")) (cons 1 "~*`.*")) ) with decimal point (ssget "_X" (list (cons 0 "TEXT") (cons 410 (getvar "CTAB")) (cons 1 "*`.*")) ) How about this filter? Say the filter above will select also the following string "A.PTR-900-322-BLD" As you see there are no decimals in this string (ssget "_X" (list (cons 0 "TEXT") (cons 410 (getvar "CTAB")) (cons -4 "<and") (cons 1 "#*") (cons 1 "*.#*") (cons -4 "and>")) ) Maybe I'm wrohg though ~'J'~ Quote
CAB Posted August 15, 2008 Posted August 15, 2008 Must start with a number AND have a decimal AND number following the decimal. (ssget "_X" (list (cons 0 "TEXT") (cons 410 (getvar "CTAB")) (cons 1 "#*`.#*")) ) Quote
CAB Posted August 15, 2008 Posted August 15, 2008 Match any string except those with a decimal followed by a number. "~*`.#*" Quote
russell84 Posted August 15, 2008 Author Posted August 15, 2008 Hey guys thats great has helped me heaps. But still i have a problem i want to select all text and mtext objects that are underlined. I can select the text objects but am having problems with the mtext objects. This is what i've got - please tell me what im doing wrong (DEFUN C:TEST2 () (SETQ SS5 (SSGET '( (-4 . "<OR") (-4 . "<AND") (0 . "TEXT");select text objects (1 . "%%U*");that are underlined (-4 . "AND>") (-4 . "<AND") (0 . "MTEXT");select mtext objects (1 . "\L*");that are underlined (-4 . "AND>") (-4 . "OR>") ) ) ) (PRINC) ) Quote
CAB Posted August 15, 2008 Posted August 15, 2008 Thanks Fixo. Russell (1 . "*\L*");that are underlined You may also need this: (1 . "*%%U*");that are underlined if the underline is not at the beginning of the text string. Quote
russell84 Posted August 15, 2008 Author Posted August 15, 2008 Thanks cab but that code for the underlined mtext works for objects that aren't underlined. eg (1 . N16 GALVANISED x 300 LONG\P@ 1200 CTS EMBEDED 200mm INTO\PEXISTING PAVEMENT.) it also slects the above text. i only want to select text thats in the format (1 . {\LPLAN}) know what i mean?? Quote
CAB Posted August 15, 2008 Posted August 15, 2008 You may want to give this a test drive. (SETQ SS5 (SSGET '((0 . "TEXT,MTEXT")(1 . "*%%U**%%u*,{*\L*}")))) Quote
Recommended Posts
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.