简体   繁体   English

如何将 XML 从 Naviswork 导出到 Forge Viewer

[英]How to export XML from Naviswork to Forge Viewer

I following this tutorial for import and work with viewpoint from Naviswork to Forge Viewer.我按照本教程从 Naviswork 到 Forge Viewer 导入和使用视点。

Do you know any solution or API on Naviswork to export this viewpoint data and saved it on my Database.您是否知道 Naviswork 上的任何解决方案或 API 可以导出此视点数据并将其保存在我的数据库中。 Thank you in advance !先感谢您 !

It sounds like a Navisworks API question, instead of Forge.这听起来像是 Navisworks API 问题,而不是 Forge。 Navisworks API does not provide a direct method to export to saved viewpoints like UI does. Navisworks API 不提供像 UI 那样直接导出到保存的视点的方法。 I happened to answer a similar question in the past.我以前碰巧回答过类似的问题。 just copied here for your reference:刚刚复制到这里供您参考:

There is not a direct API, but with SavedViewpoint API, you could dump the data from the objects, and write to the XML yourself.没有直接的 API,但使用 SavedViewpoint API,您可以从对象转储数据,然后自己写入 XML。 http://adndevblog.typepad.com/aec/2012/06/navisworks-net-api-2013-new-feature-saved-viewpoint.html http://adndevblog.typepad.com/aec/2012/06/navisworks-net-api-2013-new-feature-saved-viewpoint.html

It might be possible not all properties in the standard xml have corresponding object with API, such as terminal_velocity, however it would not impact your workflow, as most properties (especially camera related) are available with API.可能并非标准 xml 中的所有属性都具有与 API 对应的对象,例如 terminal_velocity,但是它不会影响您的工作流程,因为大多数属性(尤其是与相机相关的)都可以通过 API 使用。

About data of redline, activate each saved viewpoint one by one (by DocumentSavedViewpoints.CurrentSavedViewpoint) , call Document.ActiveView.GetRedLines().关于redline的数据,将每个保存的视点一一激活(通过DocumentSavedViewpoints.CurrentSavedViewpoint),调用Document.ActiveView.GetRedLines()。 It can return all info of the annotations: line, eclipse, text etc in Json format.它可以以 Json 格式返回注释的所有信息:行、日食、文本等。

About data of clip planes, you could use Document.ActiveView.GetClippingPlanes().关于裁剪平面的数据,可以使用 Document.ActiveView.GetClippingPlanes()。 Similarly, in Json format.同样,在 Json 格式中。

Hope it helps.希望能帮助到你。

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

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