Would deleting the RegApps cause any problems/stability issues with the drawing file?
Building on Michael's post if I may....
Registered Applications (
RegApps) are required for adding Extended Entity Data (
XDATA) to drawing objects. Many can be added each time you open a given drawing, particularly for verticals such as Civil 3D, in preparation of adding XDATA at some point while editing said drawing.
If in use, meaning XDATA has been added to one or more drawing objects referencing a RegApp, then it is unable to be purged from the drawing. However, to site RonJon's linked reference above....
When you delete an object with Extended Entity Data (xdata), a regapp ID remains in the application ID (APPID) symbol table. When a file contains excess unreferenced regapp IDs, performance and file size may be negatively affected.
Given that RegApps can be added in preparation of being needed, regardless of their actually being used, and also remain even after all drawing objects that reference same are deleted from drawing, one can easily suffer the negative performance, and drawing bloat if not specifically purged (
given that RegApps are not included in they typical calls to 'purge all', or dialog, etc.).
Calling
(command "._-purge" "_r" "*" "n") within your AcadDoc.lsp file is a great start, but only accounts for those unreferenced RegApps that exist at drawing open, and since commands cannot be called from within Visual LISP reactors, one is then relegated to other means of performing same prior to SAVE* (
i.e., redefining SAVE* Commands, using a macro to first purge RegApps, then Save, etc.), which can be cumbersome.
Programmatically iterating the
RegisteredApplications Collection via LISP is significantly slower than calling -PURGE Command, but does make it possible to do from within a reactor.
For these reasons I developed the app linked above specifically to remove the burden of user having to do any of this, so that keeping this aspect of one's drawing(s) 'clean' was essentially plug & play... The .NET API is measurably faster than both iterating via LISP, and -PURGE Command call, and so seemed like a win-win to my mind.
Hope this makes (
more?) sense. :geek:
Cheers