Getting Started Common Acronyms FAQ Forum Help Forum Tips FTP Site Helpful Guidelines Product Community Directory SELECTsupport
Somewhat related to this (and also undocumented as far as I can find) - aaApi_SelectDocumentDataBufferVersions won't select anything but the current version into a dynamic data buffer if you are not displaying all versions.
I think other data buffer selectors (both static and dynamic) operate similarly when versions are involved, though I haven't done any extensive testing to prove that one way or the other. Just something to keep in mind when dealing with data buffers and versions.
jgburrill: This is NOT documented in the SDK documentation, and yes, I have made Bentley aware of that :)
This is NOT documented in the SDK documentation, and yes, I have made Bentley aware of that :)
The SDK documentation has been updated for the 8.11.7 release. Thank you for bringing this to our attention.
Scott Soper: Jeff, could you give me some more detail on this?
Pretty much what Dean said is correct. The native Copy Out functions work correctly in PWE. But if you get into writing any custom modules with the SDK that call aaApi_CopyOutDocument that attempts to copy out an older version, but the user setting is such that they are only displaying current versions in the interface, aaApi_CopyOutDocument breaks in the custom module.
Scott,
The question was about creating customization with the API, not normal use. Some how the program was trying to work with a versioned copy when the person did not have show all versions turned on. The program is now going to have to check that and if needed temporarly change it. The label in the user settings is for the normal use with the GUI.
Jeff, could you give me some more detail on this?
If a user can only view current versions and selects a file to copy out (obviously a current version since that's all they can view) under what case would PW be trying to bring down an older version of a file? Since I assume it isn't trying to copy an older version of the file that was selected, it must be a versioned file that is referenced to it. Is that right?
On the same thought, if a user can't copy out any versioned file when they have "Show all versions" checked off, then perhaps it would be more accurate for this setting to be titled "Access current versions only" since it's truly about access and not just what displays in PWE.
DmitryY: Why aaApi_CopyOutDocument doesn't work?
Why aaApi_CopyOutDocument doesn't work?
I am not sure if my case would be the same as yours, but I ran across a similar issue recently and maybe this will help you. We couldn't figure out why Copy Out would work sometimes and not others. It was caused by the user setting to only show the current versions in PWE (as opposed to showing all versions).
Basically, if only current versions are showing and you need to copy out an older version, aaApi_CopyOutDocument will not work. I dealt with it by just temporarily forcing the user into "show all versions" programatically if they weren't already, then reset it back after the copy out.
aaApi_CopyOutDocument is just a wrapper for:
aaApi_FetchDocumentFromServer (AADMS_DOCFETCH_COPYOUT| AADMS_DOCFETCH_MASTER_AS_SET | AADMS_DOCFETCH_NESTED_REFERENCES | AADMS_DOCFETCH_REDLINED_REFERENCES, lProjectId, lDocumentId, lpctstrWorkdir, lptstrFileName, lBufferSize));
Hi all.
In my application I am trying to copy out old version of document using aaApi_CopyOutDocument, but for some reason it doesn't work and aaApi_GetLastErrorId () returns AAERR_DMS_ERR_ALLREADY_CHECKOUT. As I can see in ProjectWiseExplorer, document is not checked out. Corresponding file in my working directory (D:\workdir8i\dms00058\ver00000\test.dgn) doesn't exist.
As a work-around, I replaced aaApi_CopyOutDocument with aaApi_FetchDocumentFromServer (using AADMS_DOCFETCH_COPYOUT flag as first parameter). It started to work okay, but I want to understand the difference between those routines. Can I use aaApi_FetchDocumentFromServer to copy out documents? Why aaApi_CopyOutDocument doesn't work?
Thank you,
Dmitry