Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I'm creating an addin that allows the user to use TableCommandInput to create a table with an arbitrary number of rows and 3 columns to be filled with a value. The table contains 2x BoolValueInput (add/delete) to add or delete a row as the user needs.
I add rows using the function:
import adsk.core
import adsk.fusion
_rowNumber = 0
def addRowTTable(tableInput):
global _rowNumber
# Get the CommandInputs object associated with the parent command.
cmdInputs = adsk.core.CommandInputs.cast(tableInput.commandInputs)
# Vytvoření com inputs
NMinp = cmdInputs.addStringValueInput('TableInput_string{}'.format(_rowNumber), 'String', str(0))
Maxinp = cmdInputs.addValueInput('TableInput_value{}'.format(_rowNumber), 'Value', 'mm', adsk.core.ValueInput.createByReal(0))
Mininp = cmdInputs.addValueInput('TableInput_value{}'.format(_rowNumber), 'Value', 'mm', adsk.core.ValueInput.createByReal(0))
# Add the inputs to the table.
row = tableInput.rowCount
#tableInput.addCommandInput(valueInput, row, 0)
tableInput.addCommandInput(NMinp, row, 0)
tableInput.addCommandInput(Mininp, row, 1)
tableInput.addCommandInput(Maxinp, row, 2)
# Increment a counter used to make each row unique.
_rowNumber = _rowNumber + 1I would like to ask using what method am I able to insert the filled data from the table into a CSV file when I press OK? Since the API for TableCommandInput does not include a ListItems property.
Thank you for any advice
Solved! Go to Solution.