ollie Posted February 4, 2009 Posted February 4, 2009 Hi folks, i'm having a bit of trouble with blocks wondered if anyone could shed some light on the issues. When i create a block through autolisp two things happen, first: The block disappears and i have to insert it back into the drawing second: The colors that i have set the inidividual entites within the block are reset to bylayer. Worth noting i've just noticed that if you set the colour of new entities to anything other than by layer the colours come in as desired With that said is there a way to set that at te begining and reset it after the lisp program finishes Thanks, Ollie. Quote
uddfl Posted February 4, 2009 Posted February 4, 2009 You can setq a variable for the insertion point and have the block inserted at that point once the block is created. I am not sure I understand the part about the colors. how do you know that the entities' color changed? Are you exploding the block and then listing the entities / using xlist , or is it just a visual change? Quote
ASMI Posted February 4, 2009 Posted February 4, 2009 When i create a block through autolisp two things happen... How you make it? I know at least 5 ways of creation of the block by AutoLISP but not one of them does not change colour of entities after it. If it not a secret code protected by FBI please publish it. Quote
ollie Posted February 4, 2009 Author Posted February 4, 2009 Sorry that wasn't very well explained. The individual entities are being created using polar positioned points each entity is set to the appropriate color through entmod. The entities are added to a selection set and the items in the set are then turned into a block. The a counter is set when the lisp file is loaded to ensure that the name of the block is unique.. All the entities on the block appear white when the block is inserted and changing the color manually afterwards has no effect. Quote
uddfl Posted February 4, 2009 Posted February 4, 2009 Sorry that wasn't very well explained. The individual entities are being created using polar positioned points each entity is set to the appropriate color through entmod. The entities are added to a selection set and the items in the set are then turned into a block. The a counter is set when the lisp file is loaded to ensure that the name of the block is unique.. All the entities on the block appear white when the block is inserted and changing the color manually afterwards has no effect. Post the function, there might be a bug in it. Quote
ollie Posted February 5, 2009 Author Posted February 5, 2009 I found the sytem variable i was looking for: "cecolor" lets you set the default color putting this in fixed the issue. 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.