Jump to content

Trouble with custom button, error if trying to select all when nothing in scene


Recommended Posts

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 by SLW210
Link to post
Share on other sites

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!

Link to post
Share on other sites

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.

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

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