问题
We need to get the "Title" as seen here in the Plans folder of the Document Management page of BIM 360.
So far I can only find it at version.Value.attributes.extension.data.viewableName
where version
is initialized as follows
ItemsApi itemApi = new ItemsApi();
itemApi.Configuration.AccessToken = Credentials.TokenInternal;
var versions = await itemApi.GetItemVersionsAsync(projectId, itemId);
foreach (KeyValuePair<string, dynamic> version
in new DynamicDictionaryItems(versions.data))
{
var vieawbleName = version.Value.attributes.extension.data.viewableName
...
}
But it isn't always there. If it is there, viewableName will contain something like "A1.00 - SITE SURVEY", where "A1.00" is the "Number" of that item/version, and "SITE SURVEY" is the "Title". The issue is that most of the time, viewableName will only contain "Number" not "Number - Title".
Is there a way to get the "Title" consistently? Ideally, we would like to see the title for each version, in case it is changed from one version to the next.
回答1:
Unfortunately, the title attribute is built via BIM360 custom attributes feature, and there is no API available to fetch it currently as I know. Sorry for the bad news.
来源:https://stackoverflow.com/questions/56030673/how-to-access-the-title-of-a-file-from-a-bim-360-plans-folder