OMEGA-ThundeR Posted July 24 Posted July 24 (edited) Hi, I need to colorchange some textobject. Numbers are like 0.1, 0.2, 0.3 [....] 2.3, 2.3, 2.4 etc. For a certain range they need to be a perticulair color. They pretty much do go beyond a value of >6 The way i select them now (and this only takes a couple of minutes, so it's not very cumbersome) is by the use of the FIND command, search by '0.' '1.' '2.' etc and use the list below to select the range or all and 'add them to a selection set' and put them on a designated layer. Without using a lisp (which probably is the fastest way), is there a standard command that is able to search on a wider range? i tried to use FIND on a 'Selected objects' (all the textobjects) , but it doesn't allow me to use a '*' to show me all results. Thinking about this while writing this this, i could use the '.' in the search, since that is in all the textobjects.... But i guess this only works now because it has a dot (.) in it, it might not in the future. But i could add a pre-/suffix and still be able to filter then. But perhaps there is an easier way to list all text objects and show their content ánd is able to filter and add them to a selection set like the FIND command can do.. Edited July 24 by OMEGA-ThundeR Quote
CyberAngel Posted July 24 Posted July 24 Take a look at this page. It has some options for techniques and add-ons that may help. You can use regular expressions if your pattern becomes more complex. If all you need to do is change the color, then selection is the main hurdle. Have you gone over the extra options in the F&R window? You may need to enable "use wildcards," for instance. Quote
BIGAL Posted July 24 Posted July 24 You just need a selection set of the text and a Parse text function that returns a number value. Then just use a Cond to set the color. Not full code just a start. (cond ((and (> num 0.05)(< num 1.0))(setq col 1)) ((and (> num 0.999)(< num 2.0))(setq col 2)) .......... ) change color of object (setq ent (ssname ss (setq x (1- x)))) (setq num (atof (cdr (assoc 1 ent)))) Depending on text the atof can return a "0" there is more reliable convert string to number methods for this task. 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.