Jump to content
cadmesomehelp

layering

Recommended Posts

cadmesomehelp

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.  

Share this post


Link to post
Share on other sites
f700es

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

Share this post


Link to post
Share on other sites
rkmcswain

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

 

 

Share this post


Link to post
Share on other sites
f700es

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.

Share this post


Link to post
Share on other sites
CyberAngel

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

Share this post


Link to post
Share on other sites
RobDraw

Design Center is another option.

  • Like 1

Share this post


Link to post
Share on other sites
f700es
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.

Share this post


Link to post
Share on other sites
RobDraw

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.

Share this post


Link to post
Share on other sites
f700es

Nah Rob, it's all good ;)

Share this post


Link to post
Share on other sites
BIGAL
Posted (edited)

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

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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