1

Please be patient, I'm new to Forge, C-language, and web-apps, so I'm going to misuse terms and nomenclature like crazy. I'm working on converting a configurator from Configurator 360 to Forge. I created the original Inventor Assembly and iLogic and we farmed out the Forge side of the project. We use our ERP system to generate the engineering number we want from Forge. That number is passed to Forge through a URL and reversed engineered to select all the right options in Inventor. Then .step, .pdf, and .svf files are created with the viewer presenting the .svf and two buttons to download the .step or .pdf respectively. The .step and .pdf look just like they used to from C360 but my viewable is just wrong. capture from Forge-viewer wrong capture from Inventor-step right The color of the object should be black and it's white and all parts that are created using iFactories are missing. I don't know if this is two separate issues or caused by the way we are zipping the files for conversion. I know I haven't given much to go on as to code that could be wrong because I'm not really sure where to start. I do see this in the Immediate Window

Loading model: dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6cHJpbmNlX291dHB1dF9idWNrZXRfMTVlNDY2ZDYyNDU5NGQ3YmIyMjg0OWM3MDMxODgzOTAxL1BDNDAyMDAyMEEwMC0yOTBYVFhMLAAAAA
Exception thrown: 'Microsoft.JSInterop.JSException' in System.Private.CoreLib.dll

And then it throws that same exception 9 more times... that appears to be one less time then the number of parts that are missing from the viewer.

Any help is much appreciated even if it's just asking questions that might point me in the right direction.

Edit 1: Found a new error that might help. It shows up if I refresh the browser.

ERROR: Cannot read properties of undefined (reading 'getRoot')
TypeError: Cannot read properties of undefined (reading 'getRoot')
at Object.loadDocumentNode (https://localhost:44365/_content/ForgeFunctions/forgeViewerJsInterop.js:168:40)
at https://localhost:44365/_framework/blazor.server.js:1:70369
at new Promise (<anonymous>)
at e.beginInvokeJSFromDotNet (https://localhost:44365/_framework/blazor.server.js:1:70335)
at https://localhost:44365/_framework/blazor.server.js:1:26442
at Array.forEach (<anonymous>)
at e.invokeClientMethod (https://localhost:44365/_framework/blazor.server.js:1:26412)
at e.processIncomingData (https://localhost:44365/_framework/blazor.server.js:1:24223)
at e.connection.onreceive (https://localhost:44365/_framework/blazor.server.js:1:17308)
at WebSocket.i.onmessage (https://localhost:44365/_framework/blazor.server.js:1:46784)

Edit 2: I noticed when all the files were being copied to make the zip to create the svf, that a subdirectory was created for the iPart Members (named after the iFactory.) I use a flat zip file (all files in one big folder) so I tried creating a zip with a file structure to match our Vault structure. I then got errors that parts couldn't be found. Lots of other things were tried and then I found this blog post. I used the first option to add the "/p" in my Activity Command Line and set "autodesk.inventor.interop -> Embed Interop Types = false". My iFactory Members are now in the viewable!

Anyone have ideas on what's wrong with the colors? I believe "black" is the only color that is wrong. I do think it's a modified appearance from the appearance library but again the .step file looks good (aka is the color I set) so what in the viewer controls colors?

Edit 3: So... I fixed the colors... I opened the file in Inventor. Opened the Appearance Browser and Unchecked "Self Illumination" for the "Black" color. Saved, Tested, Worked. Went back in turned "Self Illumination" back on, Saved, Tested, Still Works! So didn't really change anything just changed it and changed back and boom.

Drew C
  • 11
  • 3
  • Thanks for all the info in the edits. Concerning "I do think it's a modified appearance from the appearance library" - we did have someone report something similar in https://stackoverflow.com/questions/65582194/inventor-assembly-not-displaying-appearances-correctly-in-forge-viewer - but you're saying all is working fine now for you after modifying the custom appearance? – Adam Nagy Mar 01 '22 at 09:42

0 Answers0