Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a very short script program (js) that won't run or debug.
I've narrowed it down to a call to design.unitsManager. If I comment out the line below where I'm trying to get the unitsManager, everything works fine. I can even evaluate in the console and see that design.unitsManager is indeed a fusionUnitsManager.
However, if the line is as shown (i.e., not commented out) Chrome doesn't launch at all. In Fusion I see the spinning dots in the list of Scripts next to my script name (and the Stop button is enabled).
This seems to follow the example program for UnitsManager.
Any ideas?
//Author- //Description- function run(context) { "use strict"; if (adsk.debug === true) { /*jslint debug: true*/ debugger; /*jslint debug: false*/ } var ui; try { var app = adsk.core.Application.get(); ui = app.userInterface; var doc = app.activeDocument; var product = app.activeProduct; var design = adsk.fusion.Design(product); var rootComp = design.rootComponent; var eval = design.unitsManager; // ============ this is the line that doesn't work } catch (e) { if (ui) { ui.messageBox('Failed : ' + (e.description ? e.description : e)); } } adsk.terminate(); }
Solved! Go to Solution.