How to access the “Title” of a file from a BIM 360 “Plans” folder

╄→гoц情女王★ 提交于 2021-01-29 10:20:46

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!