Jump to content
Simio Forum

Welcome to the Simio Forum

Welcome to the Simio Forum! Experience the full experience of the forum by becoming a Simio Insider! You must be an Insider to post on any forum!

Click_Here_button.png

New Software Release

Our latest release, Simio 11, is here!

dsroelofsen

Excel Read Node Reference State variable

Recommended Posts

Hi guys,


I am trying to read origins and destinations out of an Excel file. To do this, I defined a process, in which I read the Excel file using "Excel Read", in which I read the origins and destinations and write them in the Node Reference State Variables ExcelOrigin and ExcelDestination respectively.


After this, I created an entity, for which I assigned the Node Reference State Variables "ModelEntity.Origin" and "ModelEntity.Destination" to the previously defined "ExcelOrigin" and "ExcelDestination". Then I want to transfer the entity from Free Space to ModelEntity.Origin and set the destination using SetNode to ModelEntity.Destination.


However, upon running the model, it states that "The value 'ModelEntity.Origin' for property 'Transfer.NodeName' is a null or undefined reference". It seems that it does not read the nodes properly from the Excel file, but if I change the input in the Excel file to a random number instead of one of the nodes, it presents the error of a data error mismatch; this makes me think that it does read the Excel file and sees whether or not the input are nodes.


Is reading Nodes into a Node Reference State Variable from Excel even possible? Anyone who came across the same problem or has a solution? I have included my example in the attachment.

Excel Read Node Reference State variable.spfx

Input.xlsx

Share this post


Link to post
Share on other sites

ExcelRead only reads String and Numeric values. These string values cannot be applied to an object type state. However, you can bind your Excel file to our Tables and import your data in that way. Attached is model that demonstrates this. First, bind the Excel file to a Data table: Create a data Table (no columns), Bind to Excel file, Change Column Type to Object>Node, and Import data. Check out Help Topic Importing and Binding To Tables for more info on binding. Import can be set to Automatic (default) or Manual. Then modify your process logic to use a SetRow step instead of ExcelRead, start ExcelRow as '1', and set the Transfer and SetNode to reference the table.

TableBind Node Reference State variable.spfx

Share this post


Link to post
Share on other sites

×
×
  • Create New...