Your line 60 etc:
Could become
Good catch roy - noted.
Why (only) remove anon groups? They can be as useful/useless as named groups.
My logic was that anonymous groups are more likely to be automatically generated by another program, or inadvertently generated by an unsuspecting user; whereas, named groups are more likely to have been created purposefully.
Redundant groups...
Good idea!
Some portions of the program would have to be run repeatedly. Block defs can become empty if block refs of empty blocks have been deleted. Modularize?
Another great idea, I had overlooked the case of nested empty block definitions whose reference is the only object within the parent definition - an unlikely scenario, but certainly should be included for completeness.
Perhaps (also) start with purging. That way the program will potentially have to analyse/do less.
Good shout - I'll change this also.
really great idea Lee.
Thanks Kruuger!
- create dcl (on the fly) to select what to delete/clean and what not
Nice idea Kruuger, I shall certainly look to implement this
- maybe multilanguage option like
(nth *l (list "Utwórz blok anonimowy\n" "Make annonymous block\n"))
Since this will be a general program for all to use, multilanguage support will be a necessity - though, I'll certainly need your's (& Google's) help with this!
- maybe option to delete some dictionary (only for experts)
The program currently removes the Layer Filter dictionaries, however, I was unsure as to which other dictionaries are unnecessary and can be safely removed in general - perhaps the AEC* dictionaries when opening a drawing in standard AutoCAD?
You might like to consider issues coming from older Legacy drawings, or other cad apps that generate .dwg. An example of this is empty text strings. These used to be created in AutoCAD by editing some TEXT/MTEXT and deleting all the text in the dialogue, which resulted in an empty text string. This was fixed in later versions of AutoCAD, but is still possible in BricsCAD, and your likely to strike if your working on older drawings.
Newer versions of AutoCAD include the option to purge Empty Text Objects using the in-built Purge command, though, I agree that it would be useful to create a separate function to remove these objects to account for versions in which the option is not present - thanks!
I've also seen bad implementation of valid objects on drawings. such as drawing a property boundary using the letter "X" instead of using an appropriate linetype.
These types of bad drafting practices will most probably be difficult to detect, and furthermore, many users may hold differing opinions over what is considered a good or bad drafting practice; for this program, I was aiming more to remove general redundancies which may be applicable across all industries of drafting.
Maybe your routine needs to Audit first, provide the user with a list of potential issues, and allow them to select which ones they wish to act on.
A great idea, but I see this being potentially difficult to implement, since some operations performed by the program (such as the Purge All operation) provide no programmatic output as to the objects available to be purged by the program.
I haven't checked, but you used to have issues with purging empty layers if you had set viewport related properties from within a paperspace viewport.
Aah, viewport overrides! Another can of worms!