Autodesk forge - Error while loading Model - autodesk-forge

I have an IFC file that I can open with Forge viewer version 7.71 and earlier but not with versions 7.72 to 7.79. The view remains with the loading spinner.
I try with both svf and svf2 options when requesting conversion job.
Here is the error log:
Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at O.postLoadBubbleConsolidation (f42fd425-48e8-4395-9483-8669758069f0:2:164771)
at O.postLoad (f42fd425-48e8-4395-9483-8669758069f0:2:166089)
at Function.<anonymous> (f42fd425-48e8-4395-9483-8669758069f0:2:149625)
at u (f42fd425-48e8-4395-9483-8669758069f0:2:59301)
at XMLHttpRequest.v (f42fd425-48e8-4395-9483-8669758069f0:2:62363)
Regards.

Our engineering team fixed this bug and released a new viewer version, v7.80, yesterday night of my time (UTC+8). Please have a try! Again, we apologize for this problem.
https://forge.autodesk.com/en/docs/viewer/v7/change_history/changelog_v7/#section-1
Note. IFC file is currently processed by the Navisworks technique. See https://forge.autodesk.com/blog/faq-and-tips-ifc-translation-model-derivative-api

Related

2D viewables from Revit 2022 models do not work in the Forge Viewer

We have a Forge Viewer (GuiViewer3D, v. 7) implementation in our Nuxt app, using a few extensions (MarkupsCore, Measure, FullScreen) and custom docking panels such as a list of viewables to select from. Ever since we upgraded from Revit version 2021 to 2022, we haven't been able to display the 2D viewables from our svf files in the viewer. When we select any 2D viewable, the viewer freezes in this state:
With a few warnings thrown in the console:
Deprecated API usage: No “GlobalWorkerOptions.workerSrc” specified.
and
Warning: getOperatorList - ignoring errors during "GetOperatorList: page 0" task: "r: Cannot read properties of undefined (reading 'X')"
of which the former lead to this stackoverflow post, to which Augusto Goncalves suggested we tried uploading our revit file in your online viewer at https://viewer.autodesk.com/designviews. This works, and so we tried to create a new Nuxt app with a simple Forge Viewer implementation following the v. 7 example guide. This also works.
What we did next was to re-implement the v. 7 viewer in our production app by following the official documentation once again, thus removing any customization and leaving out everything else than the bare minimum. With this v. 7 viewer, running in a node environment on either node version 10.0 or 14.9, the bug persists, ruling out the possibility of any custom code being the cause.
Upon further debugging of scripts (loaded in via Autodesk) such as pdf.js, CompGeom.min.js, PDFLoader.js, path2d.js etc., we’ve gotten to a point where this message appears, and this is where our current trail ends:
TypeError: Cannot read properties of undefined (reading 'X') at c.strokeClipperContour (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:173979) at https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177686 at https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177811 at Array.map (<anonymous>) at c.fill (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177413) at t.value https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:16067) at t.value (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:9554) at e.beginDrawing (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:211570) at t.value (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:185323) at ttps://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:158419
We cannot effectively debug these minified scripts, and are hoping you can provide some insight as to what might be causing this issue.

WebGL context lost error on Autodesk Forge

While loading a product into the Forge viewer using latest version of Chrome, user receives a message that states "WebGL context lost". They had a model loaded into the viewer which was working fine, clicked on another model to view it and that is when they received the error message (see attachment).
Is there anything that can be done to mitigate or resolve this issue?
Click for Picture of Error Message
Here are two possibilities for this issue:
The graphic card driver is out-date, please try to upgrade it: https://knowledge.autodesk.com/support/bim-360/troubleshooting/caas/sfdcarticles/sfdcarticles/Error-WebGL-context-lost-when-viewing-files-in-BIM-360.html
There might be some viewer instances that haven't been destroyed properly. you can type NOP_VIEWERS in your browser console to see if the array length is greater than two. To fix this, you can take advantage of viewer.finish() before loading other models.

How to load otg from Bim360?

I would like to to read my bim360 models which is in otg format in my Forgeviewer (version 7.3). The projects have been converted using the https://otg-bim.herokuapp.com/ app.
Is there any guidelines of how to make my Forge viewer read otg format from Bim360? I found this guideline (https://github.com/wallabyway/OTG-client-sample/blob/552c78b1fe8e1177f6694fd947a17fd189a8505b/public/js/ForgeViewer.js#L26-L29), however it uses Autodesk.Viewing.ViewingApplication which I find in version 2 of the Forge API, but not in version 7.3.
You can use this version of the ForgeViewer.js to work with latest versions of the viewer. https://github.com/jaimerosales/OTG-client-sample/blob/master/public/js/ForgeViewer.js
It seems that it is the same svn. Fault was that options requires autorization, even though I am allready autorized through bim360 login. Providing the access token there, uncomment useCookie and useCrentials and it works.
const options = {
env: 'FluentProduction',
api: 'fluent',
//useCookie: false,
//useCredentials: false,
accessToken: "add access token even though you are allready authorized in in bim360"
};
So far, I have seen a significant improvement loading using otg :-).
The latest version of svf2 works fine when using buckets instead of bim360. I have not vertified it with bim360. Example code which was helpfull for me was this npm package. https://www.npmjs.com/package/ng2-adsk-forge-viewer

ManifestChildren throwing InvalidArgumentException in Forge PHP SDK

My file is not being translated due to an exception:
Invalid value for 'role', must be one of '2d', '3d', 'graphics', 'manifest', 'thumbnail','Autodesk.CloudPlatform.PropertyDatabase','viewable', 'ifc'
I debugged the SDK and the role that is causing the exception is Autodesk.AEC.ModelData.
The file that I am trying to translate is the same I am used to translate in my application, so I think it is a problem in Forge PHP SDK.
Yes, this is most likely an issue with the PHP SDK for Forge being out-of-date. I see that you already submitted a PR to the codebase - I will contact the dev team to make sure the new role type is recognized properly.

Custom Material Problem in Forge with Revit 2017

I followed the instructions in the blog post on custom materials in forge and got it to work with Revit 2019.
However, with Revit 2017 (I had to update it first to get the "Publish Settings" in the Collaboration tab), the completely same approach did not work and the translation failed with the following manifest message:
{
"type":"manifest",
"hasThumbnail":"false",
"status":"failed",
"progress":"complete",
"region":"US",
"urn":"dXJuOmFkc2sub2JqZWN0...",
"version":"1.0",
"derivatives":[
{
"name":"001_010_020_Gras_dicht_bump.jpg",
"hasThumbnail":"false",
"status":"failed",
"progress":"complete",
"messages":[
{
"type":"error",
"code":"Revit-UnsupportedFileType",
"message":"<message>The file is not a Revit file or is not a supported version.</message>"
},
{
"type":"error",
"message":"Possibly recoverable warning exit code from extractor: -536870935",
"code":"TranslationWorker-RecoverableInternalFailure"
}
],
"outputType":"svf"
}
]
}
The translation seems to fail because Forge does not know what to do with the image. When first trying with Revit 2019 I got the same error, but managed to resolve it by specifying a realistic 3d view for the Set in the Publish Settings. This seems to tell Forge it needs the images for creating the textures.
But for some reason, this wont work with 2017, although I make the exact same call, and have the exact same settings.. am I missing something, or doing something wrong? Is Revit 2017 handling its Publish Settings differently, or are custom textures not supported in Forge for Revit 2017 files?
I am thankful for any hint or help in this case.