Search code examples
autodesk-forgeautodesk-data-managementautodesk-bim360

Some items not returned by FoldersApi.GetFolderContents


In one of our projects, not all items shown in the BIM360 UI of a folder are returned via the corresponding API-call. We use the Forge .Net SDK:

var foldersApi = FoldersApi();
var contents = foldersApi.GetFolderContents(projectId, folderId);

This results in a list with most of the items that I expect - but without a few ifc and dwg files (50 are returned correctly, 6 are missing).

The folder I am trying to query is a subfolder of the Plans folder. I have not noticed any differences between the files that work and the ones that are missing.

Am I missing something?


Solution

  • Don't forget pagination. The Forge .Net SDK has an optional pageNumber parameter that defaults to 0.

    This is correct:

    var contents = foldersApi.GetFolderContents(projectId, folderId, null, null, null, pageNumber)