Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Please let me know if you know of any.
I believe the UserInterface.getText method can be used to get the language corresponding to the language being activated.
https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-284B455C-E192-41F7-B5D6-B086BF34E370
I couldn't find what the module names (xml files) listed in the documentation are.
I looked in the "StringTable" folder and found it in this path. (Win)
C:\Users\<USER_NAME>\AppData\Local\Autodesk\webdeploy\production\<Ver_Folder>\StringTable
I actually tested with something like this.
# Fusion360API Python script
import traceback
import adsk.fusion
import adsk.core
def run(context):
ui = adsk.core.UserInterface.cast(None)
try:
app: adsk.core.Application = adsk.core.Application.get()
ui = app.userInterface
txt = ui.getText(
'DesignVariationsUI10',
'ActivateGenWorkingModel',
'NG'
)
app.log(txt)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
The return value is defaultValue.
Does anyone have specific code that actually works?
Solved! Go to Solution.