Extractor error code -777 when using design automation - autodesk-forge

I am trying to complete a full runthrough of the Forge API for an inventor model. We have succesfully managed to submit the workitem which does everything it needs to do based on our personalised appbundles and activities.
The issue is when the new model is trying to be loaded in the viewer with the URN for the SVF which is in the newly created output bucket.
I am getting a translation error and I cannot figure out where the error is coming from or how to fix it.
Is the translation not automatically completed when the SVF is created for export, which is the point of using this activity i thought?
Is it the CreateSVF activity which is not zipping it correctly?
Any suggestions from anyone on where to look if this is an obvious one, can't find the same error online.
TIA.

There is some weird thing Inventor is doing in exported SVF for use in ForgeViewer. It looks like bubble.json is not at the level it is needed to have it. You can see how we are doing the export in our demo application. After export done by Inventor, we move bubble.json to different place. See https://github.com/Autodesk-Forge/forge-configurator-inventor/blob/master/AppBundles/CreateSVFPlugin/CreateSvfAutomation.cs#L101

Related

Model Derivative API 404 reply

I have some fairly large refit files uploaded to BIM360. When trying to use GET :urn/metadata/:guid on the 3D modelview in the file, I get a 404 reply. For the 2D views in the same file I do not have any issues.
I tried with both force-get and x-ads-force without any luck.
Using same code I do not have any issues with other files (both revit and non-refit files)
Are there any known issue with large revit-files in the translation to SVF? Any ideas to something I could test to see if it is the file or my code that has the issue?
Thank you in advance.

Missing Autodesk.AEC.ModelData in model forge viewer

I am trying to access Autodesk.AEC.ModelData data in forge viewer.
I have two revit models.
so while consuming it inside the viewer for the first model have the Autodesk.AEC.ModelData but when I am trying to access Autodesk.AEC.ModelData in 2nd model it returns me empty.
After verifying in postman by calling api I found in the second model
there is no role with the name Autodesk.AEC.ModelData and I could not find any url with AECModelData.json
so I would like to understand where is it going wrong is it problem at translation level or is has to do it with revit software. do we manually need to add AEC data before exporting file to rvt or nwd ?
please let me know any other solution to access this data or the area where I can take a look
Only RVT saved with Revit 2018 and later will generate AecModelData. If you still cannot see it on files of Revit 2018 and later, you can try to translate it again with the x-ads-force: true request header.

How to export DWG from RVT file with Forge Design Automation

I am still new to Forge Development and followed all samples in the https://learnforge.autodesk.io.
What I want to achieve is export DWG from a RVT file. I did and achieved this in IExternalDBApplication with local Revit.exe. When I try to this on FORGE, I get this error:
湥整楲杮映湩獩偨慬批捡⸮搠獥牴祯洠偟慬批捡卫慴整਍਍潣瑮湩極杮映湩獩偨慬批捡⸮搠獥牴祯挠污卬牴慥⡭ഩഊ攊楸整⁤楦楮桳汐祡慢正਍਍RESULT: Failure - Result of running user app is failure
This is the result
https://drive.google.com/open?id=12vzbErYgTGB8uLlDtoExAOZLEw87VPJtbDBlr19IX44
App can be found here https://sheetexporter.herokuapp.com/
I am trying input a *.RVT file and get a *.zip file with exported dwgs.
I set zip=true in output
Any help will be appreciated.
Thanks for all help.
It needs permission to access https://drive.google.com/open?id=12vzbErYgTGB8uLlDtoExAOZLEw87VPJtbDBlr19IX44.
Could you provide report.log and how your activity is defined? Thanks

How to export XML from Naviswork to Forge Viewer

I following this tutorial
for import and work with viewpoint from Naviswork to Forge Viewer.
Do you know any solution or API on Naviswork to export this viewpoint data and saved it on my Database. Thank you in advance !
It sounds like a Navisworks API question, instead of Forge. Navisworks API does not provide a direct method to export to saved viewpoints like UI does. 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.
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.
About data of redline, activate each saved viewpoint one by one (by DocumentSavedViewpoints.CurrentSavedViewpoint) , call Document.ActiveView.GetRedLines(). It can return all info of the annotations: line, eclipse, text etc in Json format.
About data of clip planes, you could use Document.ActiveView.GetClippingPlanes(). Similarly, in Json format.
Hope it helps.

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.