I have the following Global Table being used to provide cycle times for my processors.
The Row name is the name of the processor.
I pull the Cycle Time using the standard "Global Lookup Table" procedure:
- Object current = ownerobject(c);
- Object item = param(1);
- /***popup:GlobalTableLookupNew*/
- /***tag:Description*//**Using Global Lookup Table ( CycleTimes )*/
- Variant tableID = /**\nTable: *//***tag:TableName*//**/"CycleTimes"/**/;
- Table table;
- switch (tableID.type) {
- case VAR_TYPE_NODE: table = tableID; break;
- case VAR_TYPE_STRING: table = Table(tableID.as(string)); break;
- default:
- table = reftable(tableID.as(int));
- break;
- }
- Variant row = /**\nRow: *//***tag:row*//**/current.name/**/;
- Variant col = /**\nColumn: *//***tag:col*//**/"CycleTime"/**/;
- return table[row][col];
Is there a more efficient/elegant way to pass the processor name into the getstream() without hardcoding the processor name value? Thanks.