You are here:

AutoCAD/Custom toolbars command AutoCad LT 2010

Advertisement


Question
I am trying to make a button with a command to create a viewport on the VIEWPORT layer within paperspace.  I can get it to create the viewport by copying the other commands but I cant seem to get it to use the VIEWPORT layer and then set back to layer 0.

Please let me know if you can help me out.

Answer
Send me the contents of your macro and I'll take a look. Remember spaces (or enters) are semicolons and pauses for command input are backslashes. It needs to be exactly like you would do at the command line, with backslashes where you pick points or enter something.
Without testing, I think you would have something like this:
^C^C-layer;s;viewport;;mview;\\-layer;s;0;;

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scott Cook

Expertise

I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!

Experience

Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com. PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.

©2012 About.com, a part of The New York Times Company. All rights reserved.