简体   繁体   English

Autodesk Model 衍生产品 API 不检索所有 Revit 数据

[英]Autodesk Model Derivative API does not retrive all Revit data

Following this question按照这个问题

I am dealing with the same.我正在处理同样的事情。 I am trying to to retrive the type and type parameters, instances and instance parameters of all elements in a 3D view using Model Derivative API, but the data coming from GET/{urn}/metadata/{modelGuid} and GET/{urn}/metadata/{modelGuid}/properties is incomplete. I am trying to to retrive the type and type parameters, instances and instance parameters of all elements in a 3D view using Model Derivative API, but the data coming from GET/{urn}/metadata/{modelGuid} and GET/{urn} /metadata/{modelGuid}/properties不完整。

IE You can't get the Revit ID from Categories and Types. IE 您无法从类别和类型中获取 Revit ID。

The thing is that in the forge viewer this information appears and you can see the Revit IDs of Categories and Types and their parameters.问题是在伪造查看器中会显示此信息,您可以看到类别和类型的 Revit ID 及其参数。

I am missing anything?我错过了什么? I don't want to go through Design Automation if is not necessary.如果没有必要,我不想通过设计自动化 go。

Cheers.干杯。

What is your Revit ID?您的 Revit ID 是什么? Element Id or Unique Id ? 元素 ID还是唯一 ID

If it's element id, you can find it in the object name in Forge Viewer, or decode it from the external id like this thread: Missing revit ID in instance elements如果是元素 id,您可以在 Forge Viewer 中的 object 名称中找到它,或者从外部 id 解码它,如下线程: Missing revit ID in instance elements

Note.笔记。 For the worksharing Revit models, the element id decoded from the external id is different from its actual value, since the final element id is determined after the element is synced to the central model.对于工作共享 Revit 模型,从外部 ID 解码的元素 ID 与其实际值不同,因为最终元素 ID 是在元素同步到中央 model 后确定的。

For Revit unique id, you can find it in the external id of the object properties in Forge viewer.对于 Revit 唯一 ID,您可以在 Forge 查看器的 object 属性的外部 ID 中找到它。

So, you can find the similarities in the response of GET {urn}/metadata/{modelGuid}/properties , but it's a flattened data structure.因此,您可以在GET {urn}/metadata/{modelGuid}/properties的响应中找到相似之处,但它是一个扁平化的数据结构。 To get the relationship of instance, type, and category, we need to iterate the object tree from the GET {urn}/metadata/{modelGuid} .要获取实例、类型和类别的关系,我们需要从GET {urn}/metadata/{modelGuid}中迭代 object 树。

Note.笔记。 SVF2 model will remove element id from the object name. SVF2 model 将从 object 名称中删除元素 ID。 If you don't see that, that means your model was translated to SVF2.如果您没有看到,这意味着您的 model 已翻译为 SVF2。 You can use the request header x-ads-derivative-format: fallback to get SVF properties if the model is stored on BIM360 Docs/Autodesk Docs, or if you request SVF translation for the same model.如果 model 存储在 BIM360 Docs/Autodesk Docs 上,或者如果您请求 SVF 翻译相同的x-ads-derivative-format: fallback ,或者如果您请求 SVF 翻译相同的 Z20F35E630DAF44DBFA4C30

Here is another explanation of the difference between Revit Element Id and unique id: https://stackoverflow.com/a/48720285/7745569这是 Revit Element Id 和唯一 ID 之间区别的另一种解释: https://stackoverflow.com/a/48720285/7745569

Lastly, here is the JavaScript code snippet of extracting element id from the object name using regex:最后,这是使用正则表达式从 object 名称中提取元素 id 的 JavaScript 代码片段:

const name = 'Floors [123456]'

const elementIdRegx = new RegExp(/\[(.*?)\]/gm);
const result = elementIdRegx.exec( name );

const elementId = result[1]; //!<<< 123456

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

相关问题 Autodesk Forge-模型衍生API:Revit到.obj(基本) - Autodesk Forge - Model Derivative API: Revit to .obj (Basics) 是否可以使用Forge Model Derivative API从非Autodesk云存储服务转换(Revit)模型? - Is it possible to translate (Revit) models from non-Autodesk cloud storage services using Forge Model Derivative API? Autodesk Forge 数据管理参考 API 未列出 Revit 参考 - Autodesk Forge Data Management References API does not list Revit References 将Revit文件导入到Forge中时,Revit参数将被重命名。 - Revit parameters are getting renamed when a Revit file is being imported into Forge autodesk-model-derivative Autodesk Forge模型衍生API:OBJ文件 - Autodesk Forge Model Derivative API: OBJ files 获得视野 [Autodesk Model 衍生 API] - Get Discipline of View [Autodesk Model Derivative API] Autodesk Forge model 衍生清单 api - Autodesk Forge model derivative manifest api 如何使用 Autodesk Forge Data Management API 在 BIM360 Docs 中上传工作共享 Revit 模型 - How to Upload a worksharing Revit model in BIM360 Docs using Autodesk Forge Data Management API AutoDesk Forge:模型衍生API。 以XML提取Cobie数据(CobieLite格式) - AutoDesk Forge: Model Derivative API. Extract Cobie Data in XML (CobieLite Format) Autodesk forge 查看器可以使用从 model 衍生 api 生成的离线数据吗 - can autodesk forge viewer use offline data generated from model derivative api
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM