Hi,
I wonder if there is a way to say to the purge command that my custom objects/entities are "purgeable"? Maybe a method similar to audit exists? My goal is to obtain something like this :
User will be able to clean useless custom objects (acting like AcDbSymbolTableRecord) in dictionaries per example.
Regards,
Solved! Go to Solution.
Solved by Balaji_Ram. Go to Solution.
Hi Jonathan,
I do not find any way to have the custom objects that are purgeable listed inside the purge dialog. AutoCAD collects the object Id of the entities/objects that it wants to test and uses the AcDbDatabase::purge to determine if they are really purgeable. The ObjectId of custom objects inside the Custom dictionaries are not included in this test and so do not get listed.
But your plugin can still use the AcDbDatabase::purge method to test if your custom objects are purgeable.
Simply gather the ObjectId of the custom objects that you would want to test and and AcDbDatabase::purge will tell you if they are purgeable. The custom dictionary is a soft owner for the custom objects and so custom objects are purgeable unless there is a hard reference to it from any other entity / object.
Regards,
Balaji
Hi Jonathan,
I have contacted our engineering team on this topic to see if they have anything to add to this topic.
I will keep you updated.
Regards,
Balaji
Hi Jonathan,
I have heard from our engineering team that this is not possible at present.
This feature was not considered since it might be risky to have the custom entities and objects purged only because they do not have hard references. Such objects / entities may be required by custom applications and we do not want the user to inadvertently purge them.
You can create a custom purge command that can deal with your objects and entities using the AcDbDatabase::purge method.
Regards,
Balaji