cadmesomehelp Posted May 7, 2019 Posted May 7, 2019 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. Quote
f700es Posted May 7, 2019 Posted May 7, 2019 Start a new drawing, insert your layers from another drawing and then save this blank drawing as your new start-up template 1 Quote
rkmcswain Posted May 8, 2019 Posted May 8, 2019 @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. Quote
f700es Posted May 8, 2019 Posted May 8, 2019 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. Quote
CyberAngel Posted May 8, 2019 Posted May 8, 2019 Another option is to export the desired drawing's layer state to a file. A button script can then import this file. Quote
f700es Posted May 8, 2019 Posted May 8, 2019 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. Quote
RobDraw Posted May 8, 2019 Posted May 8, 2019 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. Quote
BIGAL Posted May 9, 2019 Posted May 9, 2019 (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 May 9, 2019 by BIGAL Quote
Recommended Posts
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.