I am working with ProjectWise Explorer SS4 on windows 7 machines. I am wanting to stop the read only dialog from popping up for users. We use quite a few read only files and this is slowing people down. I have found the correct line in the mcm.user.cfg file , but it doesn't appear to do anything. Any ideas? I can give any more info that is needed. It occurs on all read only files, not just jpg's that's just the one i opened this time. Same thing occurs on other machines, with other users. Any help or ideas would be appreciated.
Joe C.
Dialog
mcm.user.cfg
PW_DISABLE_READ_ONLY_DIALOG = 1
Dear Joe,
I think this dialog is generated by Projectiwse explorer - I think PW_DISABLE_READ_ONLY_DIALOG is only used in microstation or like as the MCM cfg is loaded by Microstation\Navigator.
I have created a SDK customisation to force some docuemtns to be opened readonly - even when the open menu option is used. - When I ask PWE to open a file read-only I do not get this message. it must be in the open menu command - I am not sure you could by pass this even with the SDK.
Best Regards,
Ian Emery
This is a ProjectWise Explorer generated dialog. Ian is correct that modification of the mcm.cfg will have no effect here.
This dialog will appear for any document that the user lacks sufficient rights to open fully for editing (the Open command). It essentially a helper that gives the user the option to Open read-only since the system can't honor the users Open reqest.
The typical cause of this dialog is double-clicking a document in PWE. While the Document menu adjusts contextually based on user access to disable the Open command as appropriate, the default double-click user setting does not. The default user setting for double-click is <default> which is the Open command. I understand your frustration with that sort of operation, but I also understand the rationale for it to work this way from a usability perspective.
What might help, at least for users that are mostly only opening files as read-only, would be change their user setting so that the default double-click action is "Open read only". The setting is under the Document List area. This setting has no effect on the document menu and how it operates.
Since you posted in the Programming forum, I'm going to assume you were also interested in a potential programming solution. While it theoretically would be possible to do some sort of customization that would intercept a double click and try to figure out the rights and user intent, I think the programming required to accomplish it would go way beyond what's available in the API, as I know of no native API calls that can change this. It would likely require programming your own custom hooks that taps in the windows messaging system... a much more daunting task.
Edit: You *might* be able to come up with something that intercepts a checkout attempt. This is what the Open command does first and where it fails if user doesn't have rights, which then rolls over to asking if the user wants to go read-only. The PW SDK hook AAHOOK_CHECKOUT_DOCUMENT might be useful here. Just remember that the hook has no way of knowing how it was invoked (double-click or menu) nor can it tell you if the user has rights to the file (you'd have to cook your own test of that too).
Please note that I post here on a voluntary basis and am not a Bentley employee.
Dear Jef,
I agree with your comment but I think there is an easier route.
use hook AAHOOK_EXEC_MENU_COMMAND
check for AAMENU_DOCUMENT,IDMD_OPEN in the parameters
check the users file access to the given file
if read+write
return AAHOOK_CALL_NEXT_IN_CHAIN to run the default action
else if read only
call aaApi_ExecuteDocumentCommand (IDMD_OPEN_READONLY,1,pDocuments);
return AAHOOK_SUCCESS (= skip the default)
end if
open read-only means no warning message.
we use some this similar to force a read-only open by default on some files.
Unknown said:use hook AAHOOK_EXEC_MENU_COMMAND check for AAMENU_DOCUMENT,IDMD_OPEN in the parameters...
check for AAMENU_DOCUMENT,IDMD_OPEN in the parameters...
I may be wrong, but I don't think AAHOOK_EXEC_MENU_COMMAND gets called by a double-click on an item because no menu is invoked.
If it gets called when a document is double-clicked (since I think the double-click is at the heart of the original issue) I'd be very interested to know that.
I just retested to be sure the double click does run through AAHOOK_EXEC_MENU_COMMAND and does bypass the open read-only message.
This means the double click may be doing somthing with aaApi_ExecuteMenuCommand - works for me.