You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
n/a
Describe the solution you'd like
Fusion 360 Add-Ins are separated into separate commands located in separate directories within the root/commands/ directory. Within the entry.py file in each command directory in the function command_created is where the definitions for the command inputs are defined. I would like to create a JSON schema that allows easier definition and customization of the command inputs.
For example, the sample commandDialog sample inlcludes the following sample command inputs:
defcommand_created(args: adsk.core.CommandCreatedEventArgs):
# https://help.autodesk.com/view/fusion360/ENU/?contextId=CommandInputsinputs=args.command.commandInputs# Create a simple text box input.inputs.addTextBoxCommandInput("text_box_1", "Some Text", "Enter some text.", 1, False)
# Create a value input field and set the default using 1 unit of the default length unit.defaultLengthUnits=app.activeProduct.unitsManager.defaultLengthUnitsdefault_value=adsk.core.ValueInput.createByString("1")
inputs.addValueInput("value_input_1", "Some Value", defaultLengthUnits, default_value)
To implement my idea, the command inputs would instead be defined in a schema file:
The function jsonSchemaInterpretingFunction would read the schema and automatically add the command inputs defined in the schema to the inputs variable in the command_created function.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
n/a
Describe the solution you'd like
Fusion 360 Add-Ins are separated into separate commands located in separate directories within the
root/commands/
directory. Within theentry.py
file in each command directory in the functioncommand_created
is where the definitions for the command inputs are defined. I would like to create a JSON schema that allows easier definition and customization of the command inputs.For example, the sample commandDialog sample inlcludes the following sample command inputs:
To implement my idea, the command inputs would instead be defined in a schema file:
The python code would be replace with this:
The function
jsonSchemaInterpretingFunction
would read the schema and automatically add the command inputs defined in the schema to theinputs
variable in thecommand_created
function.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: