get layer date of dot max file via forge viewer - autodesk-forge

I am currently tring to retrive layer data from forge viewer.
Have tried get it with viewer.impl.getLayerRoots() function but not work. The data that I got is sth like
this.
The original data is a .max file and layer info is this.
Comparing to what I got totally not match so I am wondering what is the solution

unfortunately the 3ds Max (*.max) translator does not extract layer information from the max scene file. This is a known limitation.

Related

Reality Capture output file to forge viewer

is there any way so I can see the results of the Reality Capture API output file in forge Viewer, or do I need to download first then again upload that is the only option?
The output of the Recap API that would work are the following: obj and fbx. In order for you to get a viewable and show it with the Forge Viewer it will need to go through the process of using Model Derivative to translate the file into an SVF.
Here is the steps to take to achieve this:
1st. Use Recap API and set the output as obj or fbx - https://forge.autodesk.com/en/docs/reality-capture/v1/tutorials/create-3d-mesh-from-photos/
2nd. Use Model Derivative API - https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/prep-file4viewer/

Autodesk Forge - Post Jobs - Must files be in buckets and proper URN

I am working on doing a post job and I am confused about where files need to be to run the job and the proper urn.
The examples all use a file that the user uploads to a bucket. I am trying to run the post job on a file that a user has created in Fusion 360 and that he has selected through a GUI I created. The urn in question is obtained by letting the user select the hub, project, folder(s), and file. I then use this file urn on the post job.
I keep getting back the response of :
Failed to download the design description for the input design.
My questions are:
Is it possible to do this from a users hub or do all items have to be in buckets?
Where are those translated files stored once created? If I want to get data like volume and mass without storing the translated file, is that possible?
I took the "urn:" off the front of the urn and got a different error, which I believe meant that it couldn't find any file.
Invalid 'design' parameter.
So, it looks like the urn I am using is finding a file but there is an issue somewhere that is preventing that file from being accessed or translated or something.
I keep getting back the response of : Failed to download the design description for the input design.
For Fusion 360 files make sure the extension name of the object is f2d/f3d. BTW Forge Viewer support these two formats directly so you don't have to translate to SVF for Viewer to visualize them.
Is it possible to do this from a users hub or do all items have to be in buckets?
For hub project items use the Data Management API to obtain the object ID - be sure to include the version parameter in your URN - see GET projects/:project_id/folders/:folder_id/contents and use the id of the item as your URN as well as tutorial here to help you understand how project folder items work.
Where are those translated files stored once created? If I want to get data like volume and mass without storing the translated file, is that possible?
The translated derivatives would be stored separately and you can access them through the derivative manifest. Use GET :urn/metadata/:guid/properties to query derivative properties but you will need to translate the model (to any format will do) in order to extract properties - see tutorial here.

3D Geometry missing in Revit File after model derivative SVF translation

I'm trying to translate Revit file that contains both 3D and 2D geometries. I've verified that the file contains proper 3D geometry, by opening it in revit 2019 and visualizing it through 3D viewing mode.
However, when I pass this file into model derivative process, it only creates 2D derivative.
Before translation process, I've tried to set default view of the revit file as '3D' instead of 2D drawing file, which didn't work.
I've also tried making a translation POST request with formats as 'svf', and views as both ('3D', '2D'), and ('3D' only), which both failed.
However, all these attempts didn't work, and when I inspected the manifest from the file translation, it seems like that 3D geometry is completely missing. I think that there is a unhandled exception in Model Derivative process that fails to extract 3D geometry in our particular forge model file.
If you need URN of the file / actual file, please let me know.
Thanks in advance.
- EDIT
UPDATE:
I've confirmed that the default 3D view is named as {3D}, default name set by Revit.
What is the name of your default 3D view?
The default name is "{3D}", I believe.
Maybe the translation process does not pick it up if it is named differently.
Afaik, the one and only way to specify the views for the translator to process is by using the Collaboration for Revit or C4R BIM 360 Team tool to select the views to publish to the cloud.

Finding externalId with a Forge API without loading viewer

I have been playing around with the C# DerivativesApi and I'm able to get model view meta data and properties. But I cannot find the externalId value. Is it possible to get this value without lodiang a viewer?
If the original model is from Revit this value contains the GUID of the element and it would be very useful for me to have easy access to this value.
As of now (April 2017) this information is only available on Viewer. We're currently investigating to have this exposed. A workaround is to download the Viewer JSON and extract the information.
To add a little more precisions to what Augusto mentioned, you can use take a look at what extract server is doing in downloadBubble and perform the same without viewer interaction. Once you downloaded the resources, you will find a *.db or *.sdb file which is an SQL lite database from where you can read mappings from dbIds to externalIds.
Unfortunately we don't have a sample that illustrates that workflow.
Hope that helps

Is it possible to export geometry data from a shapefile to CSV from QGIS?

I'm trying to get geometry data from a large quantity of shapefiles into a database (Google Datastore). The thing is, I don't need to work with maps, I just need the coordinates, so I would like just the numerical coordinates. Ideally I'd like to use CSV, but any plain text would be workable. I have a Mac and have been able to get QGIS installed (I also tried udig but the interface was baffling). While it is easy to load a shp file into QGIS as a vector layer, I'm lost as to how to export the geometry, or even if it is possible.
Does anyone know how to extract plain text geometry from a shp file? Ideally with QGIS, but any method would be appreciated.
The "You can simply right-click the layer entry in QGIS and select "Save as"" approach was right
But the "GEOMETRY=AS_WKT" in the OGR layer option was missing.
I may also be a good idea to convert the coordinate system to WGS 84, as CSV are usually expected not to be projected (and shapefile sometimes are)
You can simply right-click the layer entry in QGIS and select "Save as".
In the dialog, there's an option to save as "CSV".
There are plenty of options to refine the format of the generated CSV file, as well as there are many other file formats to choose from.
Update:
See here for a solution: https://gis.stackexchange.com/a/8846
Outdated Response:
It is possible, in a sort of roundabout way...
Open the attribute table for the layer you want to save.
Select all rows.
Copy the rows
Paste into a spreadsheet
Save the spreadsheet as a csv.
Unfortunately there is no way to do this directly in QGIS.
See here for more details:
https://gis.stackexchange.com/questions/8844/get-list-of-coordinates-for-points-in-a-layer/8911#8911