Jump to content
Simio Forum
Sign in to follow this  
gtwirth

Append Tables Using Add-In

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\<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". [attachment=1223:name] 7. Select Materials table...5 materials should be imported. [attachment=1224:name] 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.
[attachment=1227:name]

Share this post


Link to post
Share on other sites
Sign in to follow this  

×