Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there.
I am very interested in the "Application.executeTextCommand" method implemented in Ver2.0.8335.
https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-4DA98A57-C8E0-479E-B2FF-EB3C10BAE13F
I created a script like this to test a simple process.
#Fusion360API Python script
import adsk.core, adsk.fusion, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
txtCmd = 'data.property'
res = app.executeTextCommand(txtCmd)
print(res)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Unfortunately, doing so will result in an error.
If you actually enter the text command (txt), the result will be as follows.
Isn't there a sample for correct processing?
Solved! Go to Solution.