Jump to content

Recommended Posts

Posted

I developed an extremely simple routine to set my current layer to 0 but can not figure out how to make everything to bylayer at the same. Does anyone have any suggestions to make my current layer zero with color and linetype bylayer? My current code is below.

 

(defun c:q ()
(command "_.layer" "_set" "0" "")
(princ)
)

Posted
(command "._CLAYER" "0")
(setvar 'CELTYPE "ByLayer")
(setvar 'CECOLOR "ByLayer")

Posted

Try this .... :)

 

(mapcar 'setvar '(clayer cecolor celtype celweight) (list "0" "BYLAYER" "BYLAYER" -1))

Posted

Be careful with frozen layers...

 

(if (zerop (logand 1 (cdr (assoc 70 (tblsearch "LAYER" "0")))))
   (setvar 'clayer "0")
)

Posted (edited)
Be careful with frozen layers...

 

....(zerop (logand [b]4[/b] (cdr (assoc 70 (tblsearch "LAYER" "0"))))).....

)

 

Sweet, just to try something different i can use a similar approach in conjunction with (SSGET "_X" ... ) for locked layers

 

Nice idea , as always :thumbsup:

 

EDIT: No wonder it looks familiar, we already gone thru that lesson before -->

Put All XREFS..... post # 16

 

(retarded --> pBe

 

:lol:

Edited by pBe

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