I see the api calls for checking if a document is checkedout and if the document is checked out to you. but how do I find out who has it checked out, like the name or whatever is listed in the Out To column?
JD
Try aaApi_SelectLocations. The data will be in AADMSBUFFER_CHKL buffer.
Please note that I post here on a voluntary basis and am not a Bentley employee.
I don't see a property in that buffer for the user that has it checked out...all I see if UserID...can I get the user name with the ID?
John,
Answer Verified By: Brian Flaherty
Thanks Dan,
exactly what I needed.
Was asked for the code, here it is for c#, i have my own dll for all the wrappers and PWConstants., but other then that should be pretty straight forward.
//check if its checked out by someone else int intlocations = PWWrappers.aaApi_SelectLocationsByProp(selSheet.propFolderID, selSheet.propFileID, -1, PWConstants.AADMS_CHECKED_OUT, null, null); if (intlocations > 0) { //get the user id at the first location record int userID = PWWrappers.aaApi_GetLocationNumericProperty(PWConstants.LOC_PROP_USERID, 0); if (userID != 0) {//get user from userID int gotuser = PWWrappers.aaApi_SelectUser(userID); if (gotuser == 1) {//get user name userName = PWWrappers.aaApi_GetUserStringProperty(PWConstants.USER_PROP_NAME, 0); } } }