Jump to content

Recommended Posts

Posted

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.

Posted

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?

Posted
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.

Posted

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.

Posted
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.
Posted

I found the sytem variable i was looking for: "cecolor" lets you set the default color putting this in fixed the issue.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...