Jump to content

layering


cadmesomehelp

Recommended Posts

is there a way to make an automatic button show up on the ribbon, every time i open up autocad that will insert all my standard layers. my old place of work had this in place and im not sure how to do it. it was so helpful! can any of you help me with the steps to make this happen.  

Link to comment
Share on other sites

Start a new drawing, insert your layers from another drawing and then save this blank drawing as your new start-up template ;)

  • Like 1
Link to comment
Share on other sites

@f700es That doesn't work if you start with existing drawings from others. I don't know what @cadmesomehelp is doing, but if he/she needs to insert a standard set of layers into any drawing, you could use a lisp file or a script file, or simply insert a blank drawing that contains all of the layers.

 

 

Link to comment
Share on other sites

Did not see that the OP mentioned using "others" drawings. Any how it is pretty much the same thing as inserting a blank drawing that has the needed items and you stated.
Thanks for the correction, as always.

Link to comment
Share on other sites

Another option is to export the desired drawing's layer state to a file. A button script can then import this file.

Link to comment
Share on other sites

1 hour ago, RobDraw said:

Design Center is another option.


Actually this is what I meant by " insert your layers from another drawing " but I clearly wasn't specific enough.

Link to comment
Share on other sites

I wasn't sure exactly what you meant but I thought it might be copy/paste objects on the desired layers or insert the other file as a block and delete. Sorry to steal your thunder.

Link to comment
Share on other sites

Try this BUT note if you have custom linetypes extra code required. Change output file location to suit.

 


(alert "Only Acad line types supported\n\nload custom linetypes before running")
(setq fname (open "c:\\acadtemp\\makemylayers.scr" "W"))
(vlax-for lay (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
(setq ans (mapcar '(lambda ( p ) (vlax-get lay p)) '(Name color Linetype)))
(write-line (strcat "-layer M " (nth 0 ans) " C " (rtos (nth 1 ans)2 0) " " (nth 0 ans) " LT " (nth 2 ans) " " (nth 0 ans) " ") fname)
)
(close fname)

Edited by BIGAL
Link to comment
Share on other sites

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