Jump to content

Append Tables Using Add-In


gtwirth

Recommended Posts

Attached is an add-in that will append data from a CSV file into a Simio Table. Both the DLL and code are provided.


To run with the DLL, complete the following steps:


1. Download AppendTablesDLL.zip and extract AppendTables.dll.

2. Right click DLL and unblock.

3. Place DLL into C:\Users\\Documents\SimioUserExtensions

4. Open Simio and create New Model

5. Select "Data" tab and run "Add Scheduling List and Tables" button under the Scheduling group....This will create 7 scheduling tables.

6. Next, select the "Append Tables" button under the Scheduling group...When prompted, select "C:\Users\Public\Documents\Simio\Examples\DiscretePartProductionFiles\Materials.csv".

AppendTables_AddInButton.thumb.png.8a64e22e2d12469a6147be3c6e1239ec.png

7. Select Materials table...5 materials should be imported.

AppendTables_MaterialsTable.png.090e08732e8c64608a20d5204f7a01e1.png

8. If you run the "AppendTables" again, the data will be updated...The add-in will append the table based on Material Name...It will not clear tables and add rows. The add-in will use the first column name in the file as the key and tries to find a matching column name in the table. If there is a match, the match will be used as the key. If the row already exists in the table, it will be updated.


NOTE: This add-in also handle multiple files at a time. When prompted to select a file, choose multiple files. The import will assume the file name (excluding the extension) is the same name as the table.

 

AppendTables_MultipleFileSelect.png.2859bd227e473c9b7aae7f40a0169ea7.png

AppendTablesDLL.zip

AppendTablesCode.zip

Link to comment
Share on other sites

×
×
  • Create New...