Append Tables Using Add-In

Do you have objects, models, libraries, path decorators, textures, symbols, custom API code, documentation, or anything else others might find useful? Please attach it here with a brief description.
Post Reply
Simio Team Member
Posts: 156
Joined: Mon Jun 09, 2008 4:42 pm

Append Tables Using Add-In

Post by gtwirth » Tue Mar 15, 2016 3:25 pm

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 and extract AppendTables.dll.
2. Right click DLL and unblock.
3. Place DLL into C:\Users\<UserName>\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.png (103.25 KiB) Viewed 910 times
7. Select Materials table...5 materials should be imported.
AppendTables_MaterialsTable.png (72.55 KiB) Viewed 910 times
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 (25.65 KiB) Viewed 910 times
(14.91 KiB) Downloaded 105 times
(8.81 KiB) Downloaded 111 times
Glen Wirth
Simio LLC

Post Reply