Free Support Forum - aspose.com

Purge DWG

Is there a way to use this API to purge dwg files? In other words, does the aspose.CAD API have some sort of functionality equivalent to opening a dwg file in AutoCAD, and running the “Purge” command?

@JohnSanders,

I have tried understanding the requirements shared by you and have not been able to completely understand that. Can you please elaborate your requirement that what actually you meant by purge and require from Aspose.CAD API.

Here is a description of the “Purge” command. Does the API provide any functionality that works similar to this?

PURGE – True to its name, PURGE eliminates any unused/named objects or unused registered applications (regapps), including things like block definitions and layers, from your drawing. To run the command, simply enter “purge” into the command line, and then enter the command option “r” to remove regapps.

@JohnSanders,

I like to share that Aspose.CAD does allow you accessing the layers and entities in CAD drawing. You can load and traverse the DWG entities and layers and may remove them as per your requirements. However, there is no mechanism available to identify which are in use or are unused. I hope the shared information will be helpful.