mrgrotey Posted September 5, 2012 Posted September 5, 2012 (edited) Hi all, I'm trying to set up a button in my ribbon for a simple process I very regularly perform in AutoCAD 2010 LT. basically I want to: 1. Select everything in the model view (through an already active viewport) 2. Erase it all 3. Purge everything 4. Paste in whatever is in the clipboard memory (previously copied from a different drawing) and locate it at 0,0 coords. 5. Zoom Extents 6. Zoom out to 97% The macro below works perfectly fine as long as there were originally objects in model space to start with, but if I try this with a new file that has no model space objects (I only want one button) it stops at the 'select all' stage and refuses to continue. The error is the standard "Selecting objects...*error*" code and stops there. ^C^C_ai_selall;erase;all;^C^C_purge;a;*;n;^C^C_pasteclip;0.0;^C^C_z;e;^C^C_z;s;0.97x; Is there a way I can get this to work for both intances, when there are objects in model space AND when there are not? Michael Edited September 5, 2012 by SLW210 Quote
mrgrotey Posted September 5, 2012 Author Posted September 5, 2012 Just figured it out. I just got it to add a point object into the scene first then it always had something to erase. Thanks for looking though! Quote
SLW210 Posted September 5, 2012 Posted September 5, 2012 Glad you got it sorted. I have moved this thread to The CUI, Hatches, Linetypes, Scripts & Macros forum. Please read the CODE POSTING GUIDELINES and edit your post to include CODE tags for your MACRO. Quote
mrgrotey Posted September 5, 2012 Author Posted September 5, 2012 Hi there sorry for the errors, I would edit my post but I dont get any of those formatting buttons to choose from when I go to edit it, even if I choose 'go advanced' so cant really do much. Can you do it? maybe its because my work PC uses IE8? I can see them in the quick reply box at the bottom but not when I go to edit an existing post. Quote
SLW210 Posted September 5, 2012 Posted September 5, 2012 They should be there in "advanced" even on IE8, but I will get it for you. 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.