Is there a way to disable the "Send to Folder" action in the Export Wizard dialog using the SDK? It's easy enough to disable the a command from a menu using the command ID and aaApi_EnableMenuCommand. I am looking for perhaps a similar way to disable (or better yet, remove) the Send to Folder option inside the Export Wizard. Otherwise I will likely have to grow my own version of the Export Wizard to suit our requirements - something I'd rather not do if there are easier options.
Thanks.
It is odd you want to keep "Export to folder", but disable "Send to folder". Keep in mind, that when a master file is exported, its references are "sent to folder". The dialog was designed in such way, that export action may be not available. In this case it falls back to copy out action (the export action gets disabled). There would be an odd situation if both actions were disabled.
There is no interface to disable the action in export wizard, but you may hook to AAHOOK_COPYOUT_DOCUMENT. But be aware, that it is quite common operation in PW. Open as readonly for example calls it. Once again, why do you want to disable it?
I'm aware of the issue regarding references essentially not being "managed" even when you do a managed Export. And believe me, if you worked where I work, you wouldn't find this request odd in the least.
The reason I asked the question is because I was asked to look into it. We currently have completely disabled the Export command in PWE for all but Admin types, but we are getting a lot push back from users. Therefore we are trying to find a middle ground where we can at least force the export to be a "managed" export (even with exported references not being managed), as opposed to the free-for-all that the Send To Folder option currently is.
I hadn't thought about a hook, but could I accomplish the same "effect" by hooking AAHOOK_DOCUMENT_EXPORT_WZRD? If so, how? I'm not seeing anything in the AADOCEXPWZRD_PARAM structure (I'm assuming it's structure is _AADOC_EXP_WZRD_PARAM) that could be used to differentiate the operation as check out vs a copy out.
Or perhaps write our own Export function call to the Export dialog using aaApi_ExportDocumentDlg and passing the document command id of IDMD_CHECKOUT to the lExportCmd parameter?
Please note that I post here on a voluntary basis and am not a Bentley employee.
I complete understand this request. We try to emphasize in our training over and over that Send To Folder is not a way to circumvent ProjectWise and make it a glorified file transfer system, but that it is intended for the occasional milestone snapshot that needs to be burned to dvd. Pointing out that it is very difficult to get the files back into projectwise helps some but I can definitely see the desire to be able to disable the function!
Probably the most mis-used functions. We've had several calls at a deadline where someone was trying to get their files back into projectwise only to find the references weren't working, oh then when we did fix that they discover all the references they had originally was out of date.
Some users don't even learn after shooting themselves in the foot like that and do it again.
AAHOOK_DOCUMENT_EXPORT_WZRD is GUI hook. AAPREHOOK and AAACTIONHOOK are called before Export dialog is displayed. AAPOSTHOOK is called after the dialog is closed. User selects the type of export and does export in between. The hook is more suitable for replacing of original dialog with your own.
AAHOOK_COPYOUT_DOCUMENT is an action hook. It is called when the "send to folder" action is performed. It is not very user friendly, but 100% way to deny any copy out action.
It shouldn't be very hard to write your own lite version of the export dialog. The actual export is performed by aaApi_FetchDocuments2 function call (You can use aaApi_ExportDocuments). Everything else there is just for enabling/disabling controls, file overwrite warning, deciding if shared export is available and error reporting.
Kevin van Haaren: I complete understand this request. We try to emphasize in our training over and over that Send To Folder is not a way to circumvent ProjectWise and make it a glorified file transfer system, but that it is intended for the occasional milestone snapshot that needs to be burned to dvd. Pointing out that it is very difficult to get the files back into projectwise helps some but I can definitely see the desire to be able to disable the function! Probably the most mis-used functions. We've had several calls at a deadline where someone was trying to get their files back into projectwise only to find the references weren't working, oh then when we did fix that they discover all the references they had originally was out of date. Some users don't even learn after shooting themselves in the foot like that and do it again.
You can use the advanced menu example in the SDK to create a custom menu and hide normal menu functions. You can use the SDK to also create custom functionality and make it accessible from the custom menu. The example is in C:\Program Files\Bentley\ProjectWise\SDK\samples\mymenu
We have had discussions with B. while using Version 2004 about entirely disabling/grey out the Export command for a Common User while still allowing Admins to have it to perform their tasks. At the time, some custom solution was discussed, and that of course would cost us $$$... so it went nowhere, opened a CR instead...
The ability of a User to extract an entire Project from the PW system to any Windows folder of choice is, IMHO, a security risk that is entirely unnecessary.
I don't see how Send to Folder is more of a security risk than building a search for all files, selecting them all and doing a copy out. One way gives you the folder names too, but it's the files that are important.
As long as the user has read-only to a file they can take a copy of it at any time.