Hi all-
Don't know if this is documented elsewhere, but I thought I'd share my experiences here in case someone else hit the same wall. This applies to WorkSite API version 8.2, and maybe others as well.
I was adding documents to WorkSpace folders in code, and getting very frustrated because
myDoc.Folders.ItemByIndex(x).Contents
, the API version of "Where used," was not getting updated. The collection of folders reported would not change for anything short of logging out and back in. Even the Where Used from the UI was showing incorrect information.
I struggled with this for several hours before I discovered
myDoc.Folders.Refresh
. After calling Refresh, the information in
.Folders
is correct, and Where Used from the UI is working again.
Hope that helps.
-John