'How can you register a text to markups by program?
const config = { extensions: ["Autodesk.Viewing.MarkupsCore", "Autodesk.Viewing.MarkupsGui"] }
this.viewer = new this.$Autodesk.Viewing.GuiViewer3D(viewerDiv, config)
I'm using MarkupsGui. What I want do to is
- put text in EditMode
- take a screenshot by clicking a screenshot button
However, when I take a screenshot right after I put a text box, the text is not show in a picture. The text is not registered yet to markups.
If I click somewhere on the forge screen after I put a text, and take a screenshot, the text is shown in the picture.
How can you register a text to markups by program?
Thanks!
Solution 1:[1]
There is a blog post that goes through the process here: https://forge.autodesk.com/blog/screenshot-markups
Does this help?
Solution 2:[2]
I found a workaround.
If you change edit mode from text mode to any other mode, the text is registered as a markup and shown up in a screenshot.
markupExt.changeEditMode(new Autodesk.Viewing.Extensions.Markups.Core.EditModePolycloud(markupExt))
*EditModePolycloud is random. You can choose any mode except text mode.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | michael beale |
| Solution 2 | Yusuke |
