Preventing translating child 3D View in Autodesk Forge - autodesk-forge

Is there any way to prevent translating child 3D view in Model Derivative API?
As you can see in the following image, I don't want to see that child view in my document browser.

No, it's not possible to customize which viewable can be translated. All the available viewables will be translated.
As an ad-hoc method, you can remove that document browser UI element.

Related

Forge Viewer add markups and choose elements in 2D drawings

We use forge viewer in our app. It's work good but, we want to add more functionality. But for now i can't get the element Id. I tried to use NOP_VIEWER.getSelection() but in our app return empty array. I also tried load our document here https://forge-extensions.autodesk.io/ and tried to do the same. In your example it works. Could you tell me where is the mistake?

Forge viewer displays elements blurry in 2D views and the Measure extension does not work on them

For some of our Revit models, in Forge viewer, 2D views are display blurry, no element can be selected and the Measure extension does not work on elements and only works on the dimensions and the titleblock.
Like this example:
here and here
But it should be like this
I have tested it with our viewer, A360 viewer and Autodesk Forge Tools vscode extension.
This is because 2D drawings or PDFs can contain both vector graphics and raster graphics (this article explains the difference between the two). The measure extension needs vector graphics in order to work properly.
Thanks to Petr Broz and his hint, by changing the Model Display Style in Revit side to Hidden Line instead of Shaded the problem was solved.
Like this.
Update:
The Shadows in Graphic Display Options, also should be unchecked.

Exporting markup data in RVT/CAD format

I am using Autodesk Markupscore Extension to draw markups on 2D view. I want to create a separate rvt or CAD file for the drawn markup, which can further be used/opened in Revit soft. So the newly created 2D view(rvt/CAD) will contain only that part of 2D view which is inside the drawn markup, How can I achieve this?
I can't comment on the Revit specific piece (for that I would suggest that you check out the Revit discussion forums) but if we're talking about where Forge can help, I see two options:
you could have a Revit plugin running in the Forge Design Automation service, accepting a Revit document and some coordinates of 2D markups on the input, removing design elements that are outside of the 2D markups via Revit APIs, and generating a new Revit document on the output.
you could customize Forge Viewer to hide or occlude the parts of the 2D drawings you don't want to be visible, for example, by "hiding" them (making them semi-transparent), by changing their color, or by overlaying them with another content such as a blank SVG rectangle.

How can i create 3d pushpin extension for autodesk forge?

I want to create 3d pushpin extension for Autodesk forge v7.*. I tried to use this article`
3D Markup with icons and Info-Card.
But some functions are not working correctly. How can i use it correctly?
I got this errors in console
Now all functions are working correctly, in data i got undefined for parent. Pushpins are not appeared yet.
Apparently there were a few issues with your code:
Since Viewer v7 and onwards overlay scenes are managed so you'd need to add custom geometry with:
this.viewer.overlays.addScene('custom-scene');
this.viewer.overlays.addMesh(this.line3d, 'custom-scene');
Use arrow functions or bind for your callbacks to window and document events such as mousemove or click otherwise they'd lose their contexts and throw errors
Necessary styling was not set for the markups to persist their relative positions ...
See here with corrections to all of the above:

Forge Viewer - can we associate objects of model with markups which are drawn in viewer?

I have object tree view on left side of my viewer, now am looking to establish an association with the markups drawn on the viewer, for example if click on wall object, it should focus me that particular wall object along with the markups there and also should hide other markups in that viewer. So it's making easy for user to see all those associated markups in that wall only.
Is this doable?
Thanks in advance
it should focus me that particular wall object along with the markups there and also should hide other markups in that viewer.
Try control the visibility of a markup with:
markupExt.markups[index].shape.style.display='none/block'
And to add markups to the position of a particular node follow here: https://forge.autodesk.com/blog/placing-custom-markup-dbid
This markup extension example should show you how to do, at least, part of what you are looking for:
https://github.com/apprentice3d/ForgeViewerExtensions