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!
Registered forum members do not see this ad.
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.
Code:^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
Last edited by SLW210; 5th Sep 2012 at 05:20 pm.
Click Here
to see my AutoCAD and 3DS Max Portfolio Website
* * * * * * * * *
"People said I was dumb.... but I proved them!"
Phillip. J. Fry
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!
Click Here
to see my AutoCAD and 3DS Max Portfolio Website
* * * * * * * * *
"People said I was dumb.... but I proved them!"
Phillip. J. Fry
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.
“A narrow mind and a fat head invariably come on the same person” Zig Zigler
![]()
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.
Click Here
to see my AutoCAD and 3DS Max Portfolio Website
* * * * * * * * *
"People said I was dumb.... but I proved them!"
Phillip. J. Fry
Registered forum members do not see this ad.
They should be there in "advanced" even on IE8, but I will get it for you.![]()
“A narrow mind and a fat head invariably come on the same person” Zig Zigler
![]()
Bookmarks