hasanahtesham Posted April 28, 2014 Share Posted April 28, 2014 let say my Autocad Drawing has Many text in it,for example "TG,PG,NHP01-0035,CCW-125-hb1-55H, NGT-127-HB2-50P" i want to extract only CCW-125-HB1-55H or NGT-127-HB2-50P type of text. any lisp for that??...help me please. Quote Link to comment Share on other sites More sharing options...
Bhull1985 Posted April 28, 2014 Share Posted April 28, 2014 please define the type of text you would like to extract a bit clearer. Do you mean you want only the two strings "CCW-125-HB1-55H" // "NGT-127-HB2-50P" or do you mean that you want to pick DTEXT (single line, not-mtext, not-attribute text) with 3 characters, hyphen, 3 characters, hyphen, 3 more, -, last 3 characters? Or did you mean that you want all number and letter combinations of MTEXT only, and even those that ARE ATTRIBUTES? These are only a few examples of the possible combinations of text entities that match what you've provided and the more-specific answer would be vital I think to any program written to help you Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 29, 2014 Share Posted April 29, 2014 It could be as simple as (setq search (strcat (getstring "\nEnter first few characters") "*" )) (setq ss (ssget (list (cons 0 "Text")(cons 1 search)))) (alert (strcat "you have picked " (rtos (sslength ss) 2 0) "Text objects") ) ; now export to excel Like Bhull1985 need more info Quote Link to comment Share on other sites More sharing options...
afrazawan Posted May 17, 2014 Share Posted May 17, 2014 can you help me with more clear way thanks Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 17, 2014 Share Posted May 17, 2014 can you help me with more clear way thanks Are you the OP ? Quote Link to comment Share on other sites More sharing options...
hasanahtesham Posted July 8, 2014 Author Share Posted July 8, 2014 like text x-y-z-w, text that have 3 hyphens only. Quote Link to comment Share on other sites More sharing options...
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.