Jump to content

Recommended Posts

Posted

Hi,

 

I had a request from our surveyor to be able to move all blocks of a certain colour to a single layer. His software doesn't allow it to be done. He checked with the developer and they said no.

 

I was going to create a lisp that he can run. I've used this before so I think it can probably be modified.

 

(setq blue(ssget "x" '((62 . 5))))

(command "_change" blue "" "p" "layer" "LA0004" "color" "bylayer" "")

Posted

Should create a filter for selection using entity type and the desired color:

 

(ssget "_X" (list (cons 0 "INSERT") (cons 62 MyColor)))

 

Regards,

Mircea

Posted

Are the blocks made of ByBlock color entities and the assigned color or are the nested entities assign the color? In other words, how can you determine the inserts to filter? -David

Posted

Thanks for your help.

Posted
QSelect > ChProp?
certainly the way I would do it, depending on how many drawings you have to do.
Posted

The moving of the blocks worked fine. I have this part of the code that doesn't seem to be working and I suspect it's because I tried to control the text selection by colour and it's not right.

(and (setq text1(ssget "x" '((8 . "TEXT") (cons 62 70)))))

(command "_.CHPROP" TEXT1 "" "_LA" "CCC_SURVEY_Level" ""))

[code]

Posted

By using QUOTE (') your list isn't evaluated; try this instead:

 

(list '(0 . "TEXT") (cons 62 70))

Annother correction, by using the DXF code 8 means that you are looking for entities that reside in layer "TEXT" instead of text entities; the entity type is stored by DXF code 0.

 

Regards,

Mircea

Posted

Read this Woodman:

http://www.cadtutor.net/forum/showpost.php?p=258390&postcount=20

Posted

Thanks Mircea, that sorted the problem.

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