Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How to create a `BrowserCommandInput` and populate it with initial data from Fusion?
Generally, I can use `browserCommandInput.sendInfoToHTML(action, data)` to send data from Fusion360 to javascript.
However, it does not work for me if I do it in the CommandCreatedHandler, this function just returns false for me.
class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
def __init__(self):
super().__init__()
def notify(self, args):
try:
# Get the command that was created.
cmd = adsk.core.Command.cast(args.command)
inputs: adsk.core.CommandInputs = cmd.commandInputs
b = inputs.addBrowserCommandInput(...)
b.sendInfoToHTML(...) # returns false, has no effect
What is the recommended way to create a `BrowserCommandInput` and populate it with initial data from Fusion?
Solved! Go to Solution.