Message 1 of 8
Fusion 360 API units
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm a complete newbie to API. I found a script, and got it to run with a bit of badgering, and also discovered how to stepover in the debugging mode. What the script does is the wrong scale for me and I want to change probable cm to mm as in my normal unit mode. What I have at the beginning of the (python) code is
import adsk.core, adsk.fusion, traceback, math
def run(context😞
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
mm = design.unitsManager.defaultLengthUnits
des = adsk.fusion.Design.cast(app.activeProduct)
root = des.rootComponent
the addition of mm = design.unitsManager.defaultLengthUnits to an otherwise functioning code results in total silence when I try to run the code. When I step in debug mode, it drops out at that line. Obviously I'm missing some previous declaration, but I'm too new to the grammar to figure that out. Any ideas please.