mshearer Posted January 6, 2009 Posted January 6, 2009 After 10+ years on ACAD I finally decided to create some custom toolbars/commands. I am in the process of putting together a toolbar that can be used to 'clean-up' consultant files before being xref'd into our base plans. So far, I've gotten the macro for -scalelistedit down pat...works everytime. My problem is that I cannot get the macro for purge to work. Here's what I have [^C^C-purge;_ALL;_;_N;] anyone in the know care to help me out? Where am I going wrong? Quote
tzframpton Posted January 6, 2009 Posted January 6, 2009 ^C^C-purge;a;*;n; That should get 'er done. Quote
tzframpton Posted January 6, 2009 Posted January 6, 2009 And if you really want to do it right, don't forget to purge the RegenApps: ^C^C-purge;a;*;n;-purge;r;*;n; Quote
tzframpton Posted January 6, 2009 Posted January 6, 2009 What are the RegenApps? Apparently they are applications that increase filesize. I don't know exactly where they come from and how, but I know they can decrease filesize significantly. McSwain says to use it, so I do. He's one of the elite of the most knowledgeable on this board so I usually follor what he says to do, lol. Quote
mshearer Posted January 6, 2009 Author Posted January 6, 2009 Good deal. The files I've been cleaning up are dropping from 2MB+ down to 100-200Kb. Very nice. I appreciate the help. I'm working on more macros so I'm sure I'll have other questions down the road. Quote
Lee Mac Posted January 6, 2009 Posted January 6, 2009 McSwain says to use it, so I do. He's one of the elite of the most knowledgeable on this board so I usually follor what he says to do, lol. True... McSwain rules. Quote
Strix Posted January 7, 2009 Posted January 7, 2009 Good deal. The files I've been cleaning up are dropping from 2MB+ down to 100-200Kb. Very nice. I appreciate the help. I'm working on more macros so I'm sure I'll have other questions down the road.that's why I frequently replace the button for SAVE with a macro one which automatically purges at the same time - so I don't forget I worked for a company which was suffering from storage problems, but they sent me a drawing which had something called 'rocking chair' kicking about in it somewhere - as did every other drawing it would seem now last time I checked, rocking chairs aren't common components in railway bridges. It turns out that whoever had created the drawing border had created it in the file they'd done their tutorials and training on I gave my boss a 'zoom extents, purge, save, close, open' button to assist in drawing inspections and create hard disk space without creating another job to do Quote
rkmcswain Posted January 7, 2009 Posted January 7, 2009 What are the RegenApps? Actually, it's "RegApps", short for "Registered Application Names". If you have a custom routine and you want to store Extended Entity Data (or Xdata) on an object, you have to use an "Registered Application" name. It's basically just a way to identity this data later on when you want to retrieve it. Years ago, Eagle Point was notorious for creating hundreds or even thousands of these RegApps in drawings. Anyway, I have seen drawings with tens of thousands of these items and they can bloat a drawing significantly... Quote
tzframpton Posted January 7, 2009 Posted January 7, 2009 Actually, it's "RegApps", short for "Registered Application Names". Oh whoops, there goes my dyslexia. Sorry I always saw it as RegenApps. Thanks for the correction, lol. Quote
Lee Mac Posted January 7, 2009 Posted January 7, 2009 Excuse my ignorance, but what exactly does the purge remove? I have read the ACAD help, and it says it removes all unreferenced objects. But where do these objects come from, what are they, and why can't one see them? Quote
tzframpton Posted January 7, 2009 Posted January 7, 2009 Excuse my ignorance, but what exactly does the purge remove? I have read the ACAD help, and it says it removes all unreferenced objects. But where do these objects come from, what are they, and why can't one see them? Unreference just means "unused". So anything that's not being used will be deleted. Purge = Delete of anything that's not used (Layers, Linetypes, Text/Dim Styles, etc....) Make sense? Quote
ReMark Posted January 7, 2009 Posted January 7, 2009 Utility from AutoDesk to clean up undocumented RegApps: http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=11807875&linkID=9240618 Quote
Lee Mac Posted January 7, 2009 Posted January 7, 2009 Unreference just means "unused". So anything that's not being used will be deleted. When you say unused - what are the blocks normally referenced to? I can't understand how a something, for example, a block can be in a drawing and not appear Sorry if I'm not with it today Quote
tzframpton Posted January 7, 2009 Posted January 7, 2009 When you say unused - what are the blocks normally referenced to? I can't understand how a something, for example, a block can be in a drawing and not appear Sorry if I'm not with it today Once you insert a Block and it's "used" (i.e. you can see it somewhere in the drawing) then you cannot purge. But once you delete that block, and all other instances of it, then it becomes "unused" and it can then be purged from the drawing. Quote
Lee Mac Posted January 7, 2009 Posted January 7, 2009 But surely once its deleted, (all instances of it), then its not in the drawing anymore.? Quote
tzframpton Posted January 7, 2009 Posted January 7, 2009 But surely once its deleted, (all instances of it), then its not in the drawing anymore.? A Block can still be in a drawing but not seen. For instance, if you delete all blocks from your drawing, in can still use the Insert command to select the block from the list and "insert" it again, because technically it never left the drawing since it wasn't purged. Quote
Lee Mac Posted January 7, 2009 Posted January 7, 2009 Ahhhhh, I see now - the drawing "remembers" which blocks were inserted... Thanks for your patience StykFace Quote
Dipali Posted January 7, 2009 Posted January 7, 2009 And if you really want to do it right, don't forget to purge the RegenApps: ^C^C-purge;a;*;n;-purge;r;*;n; how do I write it in script. I TRIED TO COPY IT IN MY SATNADARD SCRIPT, BUT IT DOES NOT WORK Quote
tzframpton Posted January 7, 2009 Posted January 7, 2009 Here you go.... (remember to add an extra line at the end of the script) -purgea * n -purge r * n 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.