Hello, I can't seem to change the itemtype of the source upon creation of the source through code.
AS you can see, the source is created. I've already assigned the arrival interval based on a global table that works well, but upon creation it defaults to item type = 1. I have a processor down stream that varies the process time depending on the item type, but i can't build the source with the item type i need.
How do you code in an item type assignment for a Source that's been created through code?
THANKS!
createinstance(node("/Source",library),model()); treenode Pump=last(model()); setloc(Pump,-50,cr,0); string InterArrivalTime1 = "treenode current =ownerobject(c); return gettablenum(\"GlobalTable20\",1,1);"; setvarstr(Pump,"interarrivaltime",InterArrivalTime1); setitemtype(Pump,3);
This is the source that's created...as you can see, the item type remains 1.00 by default and doesn't change to 3 as i'd like in the setitemtype.