« View and Data API FAQs | Main | Practise with Fusion 360 and Raspberry Pi »

04/25/2016

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Afshin Jafari

Hi,
I've got the whole library and tried webpack.
at first I received a 'typescript' related error, after excluding typescript from the config file webpack ran successfully and generated .min files.
I copied the "Viewing.Extension.Markup3D.min.js" to my extension folders and tried loading it but I receive this error:

"Viewing.Extension.Markup3D.min.js:4 Uncaught ReferenceError: regeneratorRuntime is not defined"

Can you please help where to start to fix the issue?
regards,

Philippe Leefsma

No worries, you need to include babel-polyfill script or package (depending if you are using webpack in your app) before any babel transpiled code:
https://babeljs.io/docs/usage/polyfill/

Regards,
Philippe.

Afshin Jafari

Thanks Philippe,
Yes I thought that would be the case and tried (sorry I had to mention in my comment). so I installed polyfill (npm install --save-dev babel-polyfill) and added "import "babel-polyfill";" on top of the "Viewing.Extension.Markup3D.js" then ran the webpack. although it made the generated min file bigger but still I receive the same error.
Regards
Afshin

Philippe Leefsma

You have to add the polyfill on top of your app, not on top of Viewing.Extension.Markup3D.js or any other files from my library.

This error is definitely caused by an improper loading of the polyfill. It has to be loaded before any other script with has been transpiled.

Afshin Jafari

ah.. thanks, so moved it to the top and that error disappeared. now I see this:
Uncaught TypeError: Cannot read property 'registerTool' of undefined

any suggestions?
Regards,
Afshin

Philippe Leefsma

That's thrown by the line in Markup3DExtension.contructor:

this._viewer.toolController.registerTool(
this.markup3DTool)

Try loading the extension in GEOMETRY_LOADED_EVENT ...

Bon_juillet

Hi, Philippe Leefsma,
I don't know where to directly contact you. I read your content in https://stackoverflow.com/questions/46190805/autodesk-forge-markup-extension-error-create-switch-button-error#new-answer. I Would like to see your Markup UI sample but the provided link is dead. Could you please provide the active link. Your help will be highly appreciated. Thank you.

The comments to this entry are closed.

February 2017

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        

Autodesk Blogs

Share


Cloud and Mobile RSS Feed

Related Posts Plugin for WordPress, Blogger...