Hi all,
I am using aaApi_DeleteDocumentWithGUI and aaApi_GUIDDeleteProject to delete Documents and Folders in a Custom ProjectWise Explorer add-in and noticed that these deleted items do not get sent to the (relatively new) Deleted Items folder.
Does anyone know how i can get these deleted Documents / Folders to be sent there as a safeguard mechanism?
Seeing that we're now getting used to having Recycle Bin functionality, any add-ins we make that delete items would need to use this.
Regards,
Mark
Unfortunately, it isn't obvious how to do a "soft delete".
Try something like this:
#define TOTRASH 0x00000040 if (!aaApi_DeleteDocument(TOTRASH, lProjectId, lDocumentId)) { // error... }
I'm not sure if this behaves the same with with aaApi_DeleteDocumentWithGUI(), but it probably does.
(sorry my first posting had the wrong mask...)
Thanks Dan, worked perfectly. You wouldn't know what the Project Delete flag equivalent is?
OpenRoads Designer 2023 | Microstation 2023.2 | ProjectWise 2023
As far as I know it's not documented but it's implemented in the PowerShell module where I extracted the following enum.
public enum DocumentDeleteMasks { IncludeVersions = 8, MoveAction = 4, None = 0, NoSetChild = 1, NoSetParent = 2, ToTrash = 0x40 }
Thanks Rob, you don't see any ProjectDeleteMasks in there that have a "ToTrash" flag for folders?
Hi Mark, no it doesn't look like the PowerShell cmdlet Remove-PWFolder has implemented the same soft delete recycle bin functionality so I don't see a ProjectDeleteMasks definition.