• Home
  • Training Books
  • Subscribe to Our Email Newsletter
  • About
    • Contributors
    • Feedback
    • Contact
    • Privacy policy
    • Cookie Policy

CADnotes

CAD Tutorials and Best Practices for professionals and students

  • Featured
  • AutoCAD
    • AutoLISP
  • Revit
    • Revit Architecture Basic
    • Revit MEP Basic Tutorial
  • Inventor
  • MicroStation
    • MicroStation Basic Tutorial
  • CADnotes on YouTube
You are here: Home / AutoCAD / Create your own magic button to restore AutoCAD layers and styles

Create your own magic button to restore AutoCAD layers and styles

July 23, 2014 by Edwin Prakoso 4 Comments

In this Article...

  • The fastest way to restore object from template
  • The magic button
  • It doesn’t have to be complicated

AutoCAD template is very helpful if you want to start your drawing with predefined setup. You can have all the layers, blocks, layout and all necessary setup right when you create your drawing. It’s not only make you more productive. It helps you to maintain drawing standards as well.

But using template sometimes make your drawings a bit complex. You can have hundreds of layers. And maybe several styles. We don’t use many of them. During the drawing process, we tend to purge the unused objects.

This however, can cause another problem. What if we want to use the layer or styles that has been purged?

pressing-key.png

The fastest way to restore object from template

There are several ways you can do to restore layers and styles. However, the fastest way is to insert a drawing as block to your current drawing.

Here is the details:

  1. Copy your template. Rename the new template, change the DWT extension to DWG. As we know already, DWT is actually just an AutoCAD drawing.
  2. Activate insert block. Browse and find the DWG drawing. Click OK to insert block.
  3. AutoCAD will insert all defined objects in DWG file (that are the same with in your template).
  4. When AutoCAD ask you for insertion point, just press ESC to cancel. We don’t need to actually insert the block, we just want AutoCAD to insert all objects within the drawing.

That’s it!

The magic button

Now that you know how to restore the objects easily, we’ll try to make it even easier. We’ll create a magic button to restore the object.

You need to create a custom command. If you are not familiar with CUI yet, you can learn how to create a custom command here.

The macro is simple:

^C^C-insert;"your_file_name.dwg";^C^C

Replace file name with your drawing file name. Very simple, right?

restore_standard_button

Now one thing you should remember: Place the drawing file name in a folder that’s defined as AutoCAD support File Search Path. If you want to place it in custom location, define the location in support file search path.

It doesn’t have to be complicated

Many great tips are actually very simple, but we never thought about it. Many times we think customization is a difficult and complex task. It doesn’t have to. Do you have a simple customization tip to share? You can write for CADnotes and share your tips to the community!

This tip was mentioned to me by Hai Le (@ThatCADguy) on twitter. Thank you for the great tip Hai Le!

About Edwin Prakoso

I work as a Solution Consultant in Datech Solutions, Tech Data Indonesia. I've been using AutoCAD since R14 and Revit since Revit Building 9. I occasionally write for AUGIWorld magazine and I am also active in Autodesk discussion forum. I'm a member of Autodesk Expert Elite, an appreciation for individuals who give contributions to the Autodesk community.
Connect with me on twitter or LinkedIn.

Filed Under: AutoCAD Tagged With: autocad tips, macro, standard, template

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

4 Comments
Inline Feedbacks
View all comments
Martin Moran
Martin Moran
7 years ago

I liked this post very much! But anyways I wonder why wouldn´t there be a purge lock for layers, or something….don´t know.
Saludos,

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Martin Moran
7 years ago

Hi Martin,

AutoCAD doesn’t have the lock from purge command. But I posted a workaround how to protect them. You might be interested to read this: How to Prevent AutoCAD Layers and Styles when using PURGE.

0
Reply
Martin Moran
Martin Moran
Reply to  Edwin Prakoso
7 years ago

Thanks Ed!!, I just read the email about it. I´ll take a look at it!!

0
Reply
tanuj
tanuj
9 years ago

i should have full notes of auto cad and more latest command

0
Reply
wpdiscuz   wpDiscuz
Join Our Free Email Newsletter
  Thank you for Signing Up
Please correct the marked field(s) below.
1,true,6,Contact Email,2 1,false,1,First Name,2 1,false,1,Last Name,2

Featured

AutoCAD customization: 5 articles to learn about CUI

AutoCAD CUI customization roundup. If you want to customize AutoCAD interface, here you can learn how you can create partial customization file, create command, working with ribbon, toolbar and menu, and more cool things!

Recent Articles

  • Model-Based Progress Tracking in Autodesk Build
  • Understanding Surface and Cut Patterns in Revit
  • Revit 2024.1 Update is Released

Advertisement

New on CADnotes

  • Model-Based Progress Tracking in Autodesk Build
  • Understanding Surface and Cut Patterns in Revit
  • Revit 2024.1 Update is Released
  • What’s New in Revit 2024: Bending Detail
  • What’s New in Revit 2024: The Dark Theme

Meet the Authors

avatar for
avatar for
avatar for
avatar for
avatar for
avatar for

Get Connected

CADnotes on FacebookCADnotes on InstagramCADnotes on TwitterCADnotes on YouTube

© 2009 – 2023 CADnotes · Feedback · Privacy Policy · Become an affiliate

wpDiscuz