Message 1 of 4

Not applicable
08-18-2018
10:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, How do I change units using the API?
I've very simplistically tried this:
global _app, _ui, _design _app = adsk.core.Application.get() _ui = _app.userInterface product = _app.activeProduct _design = adsk.fusion.Design.cast(product) _design.unitsManager.defaultLengthUnits = 'm'
based on your documentation (which I also can't link here, another problem I should probably create a forum post about at some point...) Anyway it was from:
As the document says:
"Returns a specialized UnitsManager that can set the default length units and work with parameters.
Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h"."
But then you read underneath:
"
Property Value
This is a read only property whose value is a FusionUnitsManager."
So read only... How can I set it then?
Solved! Go to Solution.