【问题标题】:BIM Viewer Markup - Can we edit saved markups or is it only supports view?BIM 查看器标记 - 我们可以编辑保存的标记还是仅支持查看?
【发布时间】:2020-05-03 11:59:32
【问题描述】:

我们可以编辑在查看器上绘制的已保存标记吗? 它只支持使用 restoreState 和 loadMarkups 函数的视图吗?

或者无论如何我可以更新创建和保存的标记,因为我的功能需要审阅者用户应该能够更新此标记。

var markupsPersist = markup.generateData()
// current view state (zoom, direction, sections)
var viewerStatePersist = markup.viewer.getState()
// finish edit of markup
markup.leaveEditMode()
// hide markups (and restore Viewer tools)
markup.hide()

// restore the view to the state where the markups were created
markup.viewer.restoreState(viewerStatePersist)
// show markups
markup.show();
// show the markups on a layer
markup.loadMarkups(markupsPersist, "layerName")

【问题讨论】:

    标签: autodesk-forge autodesk-viewer autodesk-model-derivative


    【解决方案1】:

    我也遇到过这种情况,您可以编辑保存的标记。您可能需要将标记状态存储到您自己的数据库中,以供审阅者稍后访问和恢复。这是显示此功能的示例。

    https://forge-rcdb.autodesk.io/configurator?id=598d7ec14cabf2c1f4dec948

    这里也是讨论这个的博客文章。 https://forge.autodesk.com/blog/high-performance-3d-markups-pointcloud-forge-viewer

    【讨论】:

      【解决方案2】:

      当然,您可以通过markupExt.markups 访问标记,例如,您可以使用以下内容编辑文本标记:

      const textMarkup = markupExtension.markups[0]; //access the existing markups via markupExtensionObject.markups
      textMarkup.setText('new text');
      markupExtension.leaveEditMode();
      markupExtension.enterEditMode() //be sure to re-enter edit mode for the changes to take effect
      

      【讨论】:

      • 我不清楚。实际上我的要求是如果我们已经保存了标记,我们可以恢复和编辑它吗?如果是的话,你能给我举个例子吗?谢谢
      猜你喜欢
      • 2020-05-19
      • 2019-05-08
      • 2018-12-31
      • 2019-05-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-24
      相关资源
      最近更新 更多