GMaracchioni Posted January 14, 2016 Share Posted January 14, 2016 Hello there, I have a file (probably exported from rhino, not sure about that though) where all objects have rgb colour properties to them. White lines are RGB 255, 255, 255, which makes them look fine in model space, though they look white on white in paper space. I would like to convert those objects to WHITE, so that I can set a print profile that would make them print black if that makes sense? At the moment I can only select the objects one by one, which is nearly impossible as the drawing is quite big. I tried to use quickselct, which kind of worked, though it did not allow me to select objects belonging to blocks (of which there are plenty, unfortunately!). Thanks a lot for any help! G Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 15, 2016 Share Posted January 15, 2016 Ignoring the other part for the moment this is a possible way of getting at the colour values, you could do a selection and pick what you want as a using "X" could produce some odd results. As in the example you would need some form of list like 255,255,255 is color index now 7 White/black and Colormethod = 195 maybe this will work ; get the colour values (setq obj (vlax-ename->vla-object (car (entsel)))) ; pick an object (setq col (vla-get-TrueColor obj)) (vlax-Dump-Object col) this is a RGB IAcadAcCmColor: AutoCAD AcCmColor Interface ; Property values: ; Blue (RO) = 38 ; BookName (RO) = "" ; ColorIndex = 52 ; ColorMethod = 194 ; ColorName (RO) = "" ; EntityColor = -1025917402 ; Green (RO) = 190 ; Red (RO) = 217 this is colour 152 ; IAcadAcCmColor: AutoCAD AcCmColor Interface ; Property values: ; Blue (RO) = 204 ; BookName (RO) = "" ; ColorIndex = 152 ; ColorMethod = 195 ; ColorName (RO) = "" ; EntityColor = -1023410024 ; Green (RO) = 102 ; Red (RO) = 0 (vla-put-ColorMethod col 195) (vla-put-ColorIndex col x) ;x is 1-255 Quote Link to comment Share on other sites More sharing options...
GMaracchioni Posted January 15, 2016 Author Share Posted January 15, 2016 Hello Bigal, thanks for your reply! unfortunately I could not understand much of it! :-) I might not be an advanced enough cad user (I have not used any code before). I did however try to paste the code you posted into the command line, but that led to no results. Sorry I think it's me making some mistake here! Could you please be more precise as to how to use the code? Should I paste everything into the command line? should I omit some lines? Should I aste the code in different batches? etc... Many thanks! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 16, 2016 Share Posted January 16, 2016 I need to do some more homework as well. Quote Link to comment Share on other sites More sharing options...
Cad64 Posted January 17, 2016 Share Posted January 17, 2016 Can't you just open your layer manager and change the layers that are 255,255,255 to white? Or is there a color override on the objects so that color is not set bylayer? Quote Link to comment Share on other sites More sharing options...
GMaracchioni Posted January 18, 2016 Author Share Posted January 18, 2016 Hi Cad64, thank you for your comment! and yes, unfortunately I cannot change objects colour through changing layers properties as objects are indeed individually overwritten. I could select them one by one but it would take ages (and I would also have to explode or enter all blocks!). I have done more researching into the origin of the file, which I now know, was definitely made with rhino. There, all objects were just rgb white, regardless of their layer. Any idea, now...? Quote Link to comment Share on other sites More sharing options...
SLW210 Posted January 18, 2016 Share Posted January 18, 2016 QSelect by color should select all 255,255,255 objects, then change to white or ByLayer. For blocks see if this thread for setting All Objects in Blocks to Layer 0 helps. Quote Link to comment Share on other sites More sharing options...
GMaracchioni Posted January 18, 2016 Author Share Posted January 18, 2016 Hi SLW210! yeah qselect works, had successfully tried that. Unfortunately I could not work with the thread you recommended as I have never worked with codes and I do not seem to be able to make sense of that :-( Sadly, I do not know what a lisp is. If you could guide me through how to make us of that thread I will be grateful. Am I supposed to copy the des in the boxes in the command line at all? Should the all thing be pasted in there at once? I have tried that but autocad does not seem to respond by moving all objects in blocks to layer 0, which is what those commands are supposed to do, right? thanks a lot! Quote Link to comment Share on other sites More sharing options...
SLW210 Posted January 18, 2016 Share Posted January 18, 2016 How to use LISP. If it is LISP in a Code Tags (like the ones on the link I posted), just copy all of the contents in the code box to Notepad and save as a .lsp , if you see a defun c:norm2 in the code, then the norm2 is the command to call the LISP. Quote Link to comment Share on other sites More sharing options...
GMaracchioni Posted January 18, 2016 Author Share Posted January 18, 2016 ok I will try that, thanks a lot. just a quick question: the first code does not read defun c:norm2. Instead, it says: defun c:fixblocks how do I call the LISP in this case? many thanks Quote Link to comment Share on other sites More sharing options...
Cad64 Posted January 18, 2016 Share Posted January 18, 2016 just a quick question: the first code does not read defun c:norm2. Instead, it says: defun c:fixblocks how do I call the LISP in this case? There are several lisp routines in that thread. The ones from chulse and fuccaro are the "fixblocks" routines, but if you scroll down further, there is one from kpblc which is the "norm" routine. And on page 3 there is the "norm2" routine. So it depends on which one you decide to use. Quote Link to comment Share on other sites More sharing options...
GMaracchioni Posted January 18, 2016 Author Share Posted January 18, 2016 and whichever I use is the same procedure, except I need to call them up by typing in the routine name in the command line? so norm2, or fixblocks, orn norm, etc in the command line? can I name the 'lsp file anything I want, and can I save it anywhere? sorry for bombarding you guys with questions, and thanks for your help! Quote Link to comment Share on other sites More sharing options...
Cad64 Posted January 18, 2016 Share Posted January 18, 2016 (edited) I just noticed you're using Autocad LT. Sorry but you can't run lisp routines in Autocad LT. Since you are using LT, you should post your questions in the Autocad LT section: http://www.cadtutor.net/forum/forumdisplay.php?82-AutoCAD-LT Edited January 18, 2016 by Cad64 Quote Link to comment Share on other sites More sharing options...
GMaracchioni Posted January 19, 2016 Author Share Posted January 19, 2016 right...well thank you for your help anyway Quote Link to comment Share on other sites More sharing options...
GMaracchioni Posted January 19, 2016 Author Share Posted January 19, 2016 Hello there, I have a file (probably exported from rhino, not sure about that though) where all objects have rgb colour properties to them. White lines are RGB 255, 255, 255, which makes them look fine in model space, though they look white on white in paper space. I would like to convert those objects to WHITE, so that I can set a print profile that would make them print black if that makes sense? At the moment I can only select the objects one by one, which is nearly impossible as the drawing is quite big. I tried to use quickselct, which kind of worked, though it did not allow me to select objects belonging to blocks (of which there are plenty, unfortunately!). Thanks a lot for any help! G Quote Link to comment Share on other sites More sharing options...
SLW210 Posted January 21, 2016 Share Posted January 21, 2016 I combined your threads, sorry I totally missed you were using LT. Unfortunately, using LT you are stuck with doing the blocks manually, or exploding the blocks. You might try getting a forum member with full AutoCAD to fix the blocks. 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.