<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Print inputs from TableCommandInput into CSV file in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11733088#M4510</link>
    <description>&lt;P&gt;Because I made the function to add a row to the table in a separate file I did not see the properties of the returned object and therefore I was not able to find the .value in the function menu. The getInputAtPosition property is the solution.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2023 13:55:32 GMT</pubDate>
    <dc:creator>tomas.bangoA2EPZ</dc:creator>
    <dc:date>2023-02-06T13:55:32Z</dc:date>
    <item>
      <title>Print inputs from TableCommandInput into CSV file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11727678#M4505</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I add rows using the function:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;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 + 1&lt;/LI-CODE&gt;&lt;P&gt;I 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any advice&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 15:21:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11727678#M4505</guid>
      <dc:creator>tomas.bangoA2EPZ</dc:creator>
      <dc:date>2023-02-03T15:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Print inputs from TableCommandInput into CSV file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11728297#M4506</link>
      <description>&lt;P&gt;I think you want to use &lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-D6DF9E75-000E-4272-A818-992160D1F9E8" target="_blank" rel="noopener"&gt;getInputAtPosition&lt;/A&gt;, which allows you to get the input at a specified row and column. You can then get the value from the input and write it out to a CSV file.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 18:46:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11728297#M4506</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2023-02-03T18:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Print inputs from TableCommandInput into CSV file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11729857#M4507</link>
      <description>&lt;P&gt;Hello again thank you for the advice I am currently using for and row count to sequentially print "input" from each column on each row. Unfortunately the result pasted into CSV looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;3 collumns and 2 rows:
&amp;lt;adsk.core.ValueCommandInput; proxy of &amp;lt;Swig Object of type 'adsk::core::Ptr&amp;lt; adsk::core::ValueCommandInput &amp;gt; *' at 0x00000171BB2D7630&amp;gt; &amp;gt;,&amp;lt;adsk.core.ValueCommandInput; proxy of &amp;lt;Swig Object of type 'adsk::core::Ptr&amp;lt; adsk::core::ValueCommandInput &amp;gt; *' at 0x00000171BB3BA420&amp;gt; &amp;gt;,
&amp;lt;adsk.core.ValueCommandInput; proxy of &amp;lt;Swig Object of type 'adsk::core::Ptr&amp;lt; adsk::core::ValueCommandInput &amp;gt; *' at 0x00000171BB2D7F90&amp;gt; &amp;gt;,&amp;lt;adsk.core.ValueCommandInput; proxy of &amp;lt;Swig Object of type 'adsk::core::Ptr&amp;lt; adsk::core::ValueCommandInput &amp;gt; *' at 0x00000171BB3BA0F0&amp;gt; &amp;gt;,&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How exactly to get the value inside the input? Thank you very much.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 15:38:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11729857#M4507</guid>
      <dc:creator>tomas.bangoA2EPZ</dc:creator>
      <dc:date>2023-02-04T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Print inputs from TableCommandInput into CSV file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11731964#M4508</link>
      <description>&lt;P&gt;It depends on what you want and the type of input you're using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if you are using a BoolValueCommandInput, it has a "value" property that returns a Boolean value, so you'll probably want to convert it to a string to save to the CSV. The&amp;nbsp;TextBoxCommandInput has a "text" property that returns a string containing the current value of the text box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ValueCommandInput is a bit more complicated. It has both a "value" and an "expression" property. The "expression" property returns what you see in the input. It could be something simple like "2.5 in" or more complex like "Length / 2.0". The "value" property returns the result of evaluating the expression and uses internal database units. For example, the value of the "2.0 in" expression will be a double value of 5.08 since the internal unit for length is Centimeters.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 04:08:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11731964#M4508</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2023-02-06T04:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Print inputs from TableCommandInput into CSV file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11732611#M4509</link>
      <description>&lt;P&gt;But how to get from for example&amp;nbsp; pwatch.&lt;SPAN&gt;getInputAtPosition(i,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;) (Where&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;pWatch=inputs.addTableCommandInput(&lt;/SPAN&gt;&lt;SPAN&gt;'Bay Watch'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Tvorba Hlidaných parametru'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'2:1:1'&lt;/SPAN&gt;&lt;SPAN&gt;)) to&amp;nbsp;&lt;SPAN&gt;ValueCommandInput.value?&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do I understand correctly that I have created a table using TableCommandInput which has 3 columns and x rows where in 1 column I have StrignValueInput in 2 and 3 I have ValueInput? The function getInputAtPosition returns me the Command Input. By using parentCommand I got one level up but I need one level down to be able to look into ValueInput.value for example. But how to do that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 10:37:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11732611#M4509</guid>
      <dc:creator>tomas.bangoA2EPZ</dc:creator>
      <dc:date>2023-02-06T10:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Print inputs from TableCommandInput into CSV file</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11733088#M4510</link>
      <description>&lt;P&gt;Because I made the function to add a row to the table in a separate file I did not see the properties of the returned object and therefore I was not able to find the .value in the function menu. The getInputAtPosition property is the solution.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 13:55:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/print-inputs-from-tablecommandinput-into-csv-file/m-p/11733088#M4510</guid>
      <dc:creator>tomas.bangoA2EPZ</dc:creator>
      <dc:date>2023-02-06T13:55:32Z</dc:date>
    </item>
  </channel>
</rss>

