简体   繁体   English

如何从BIM 360“计划”文件夹访问文件的“标题”

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

We need to get the "Title" as seen here in the Plans folder of the Document Management page of BIM 360. 我们需要得到的“标题”处看到这里的BIM 360的文档管理页面的计划文件夹。

So far I can only find it at version.Value.attributes.extension.data.viewableName where version is initialized as follows 到目前为止,我只能在version.Value.attributes.extension.data.viewableName中找到它,其中version初始化如下

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". 如果它在那里,viewableName将包含类似“A1.00 - SITE SURVEY”的内容,其中“A1.00”是该项目/版本的“数字”,“SITE SURVEY”是“标题”。 The issue is that most of the time, viewableName will only contain "Number" not "Number - Title". 问题是,大多数情况下,viewableName只包含“Number”而不是“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. 理想情况下,我们希望看到每个版本的标题,以防它从一个版本更改为下一个版本。

Unfortunately, the title attribute is built via BIM360 custom attributes feature, and there is no API available to fetch it currently as I know. 遗憾的是,title属性是通过BIM360自定义属性功能构建的,目前还没有可用于获取它的API。 Sorry for the bad news. 关于这些坏消息我很遗憾。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM