With the enhanced check-in dialog in V8i, there is a checkbox that allows a user to "create new version during check-in" if the user has version rights. While I know you can disable the ability to version on a per user basis, that is an all-or-nothing approach, which overrides our need to create versions at times other than check-in. There doesn't seem to be a way to disable the checkbox. Ideally we want to disable it because we would never want users versioning at check-in. A datasource setting to this effect would be a simple and easy solution, but I can find no such setting.
Because we have very specific processes tied to user rights and workflow states, we have PWE customizations in place that rely on AAHOOK_CHANGE_DOC_VERSION to detect and control versioning actions. It works very well in XM, but when checking in a drawing in V8i, with this new "version at checkin" checkbox selected, it isn't caught by the hook.
AAHOOK_CHANGE_DOC_VERSION is only tied to aaApi_NewDocumentVersion() and aaApi_ChangeDocumentVersion() functions. And from what I can gather, the new dialog aaApi_DocumentCheckInActionDlg2() doesn't offer any hooks either. I'm not finding any help in the SDK about this. Are there any options I'm missing that would allow me to address this issue programmatically? Or do I need to file a CR?
Thanks,
Jeff
Please file a service ticket with TSG, and they will file a CR. That will enable us to better track the request.
Mike
I have gotten this to work in a non-MicroStation checkin. I did a recomplie, and that's all. Who knows why, but now it functions as expected. As for MicroStation Integration, I had forgottent to check that box on the module manager. Now it also works as expected.
For the time being, I am preventing versioning at checking by checking the DOC_PROP_DMSSTATUS and if the file isn't checked-in, the hook prevents the version, but continues on and checks in the drawing. This still isn't optimal operation, as having the ability to disable the option completely as a datasource setting would be much simpler and less confusing to the user. Do I need to go through TSG to request this as a CR, or is the post here enough?
Thanks for the help everyone.
Please note that I post here on a voluntary basis and am not a Bentley employee.
I am still trying to isolate where the problem is, but from the responses I see, there should be no reason for the version hooks to function any differently than they did in V8 2004 and XM, since AAHOOK_CHANGE_DOC_VERSION should hook if the box gets checked on check-in.
Ian points out a potential pitfall on the MIcroStation side of things I really hadn't thought about, but at least in my testing, check-in was all being done on the PWE side and not MicroStation, so in my mind, the hook should be catching it, but it doesn't. Of course, I don't know how to accomplish the same thing yet on the MS side (never done it before with hooks). Looks like my to-do list just grew a bit more.
I'll post up some test code when I have a little more time to devote to this.
Dear Jeff
May be there is a fault in your work flow...
If you are going to microstation then when closing microststation a projectwise checking dialog is shown with a create new version check box. Check the box and proejctwise will checkin the document and create a new version. This check box call a AAHOOK_CHANGE_DOC_VERSION hook but only when the customisation is registered to be loaded by microstation if it is only registered to be loaded by projectwise explorer it will not be called when this check box is used during checkin from microstation.
Additionally this could be the solution create a simple customisation that prevents a new version from being created but only register it to be loaded for microstation and not projectwise explorer.
I have already got a hook that acts when the above check box is set in microstation working in XM.
Best Regards,
Ian Emery.
Hi Jeff,
You are right - there is no setting to turn off the checkbox. However the AAHOOK_CHANGE_DOC_VERSION should work for you, because aaApi_NewDocumentVersion function is called, if the checkbox is checked. Could you provide a code sample which I would be able to compile and run on my environment?