T O P I C R E V I E W |
mblodgett |
Posted - 04/23/2013 : 09:36:24 AM I have a custom function that contains a dataset-specific constant as one of it's parameters. It would be very useful if it could calculate that constant from the value of the Parameters header row.
Origin Ver. and Service Release (Select Help-->About Origin): 8.1 SR3 Operating System: Windows 7 |
1 L A T E S T R E P L I E S (Newest First) |
Drbobshepherd |
Posted - 04/23/2013 : 10:33:45 AM Data associated with with a dataset is called metadata. You may like to read up on accessing metadata in the Help files.
Meanwhile, accessing the value of a header cell is similar to reading any cell in a dataset. For example, to assign the value in (Column 2, Row 3) to a variable, execute the following command:
double myvariable = col(2)[3];
To access a header value, use the header-row code (Look up "Column Label Row Characters" in Help Files) instead of row number within the square brackets. Note that headers are strings so don't forget to convert the value to a numeric. For example:
double par1 = %(col(2)[p1]$); // Get value from first parameter row.
DrBob
|
|
|