| T O P I C R E V I E W |
| cmndmn |
Posted - 02/18/2004 : 1:16:48 PM Hi All!
How I can get a int value of items from hand-made creating STATUS button (by UIM)? |
| 7 L A T E S T R E P L I E S (Newest First) |
| cmndmn |
Posted - 02/19/2004 : 10:29:23 AM Thanks a lot, Mike! It helped.
Dmitriy. |
| Mike Buess |
Posted - 02/19/2004 : 09:26:54 AM You need Origin 7.0 SR2 or higher in order for Origin C to recognize LabTalk as a keyword. In SR0 you should be able to do something like this...
Layer lay = Project.ActiveLayer(); lay.LT_execute("n = STATUS.item1"); double dN; LT_get_var("n",&dN); int iN = (int) dN; out_int("n=",iN);
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 02/19/2004 09:32:54 AM |
| cmndmn |
Posted - 02/19/2004 : 09:09:30 AM I still have this problem. But I sure my worksheet is active. I can get a item value by ScriptWindow. This is simple:
n = STATUS.item1; But I can't do it in OC. The object STATUS is in the active layer. Is this possible if I use Origin 7.0 SR0? |
| Mike Buess |
Posted - 02/19/2004 : 08:34:53 AM quote: using status = LabTalk.STATUS; - Variable "" not declared
1. The object must be in the active layer. That message suggests that it is not.
2. STATUS on the right should be the name of the object as shown in the label control dialog. (The status on the left can be any valid Origin C variable name.)
quote: Please tell me where I can find information or tutorial about UIM objects. Methods, properties or others.
Your OriginPro manual. There's nothing special about handling UIM objects in Origin C - just treat them like any other LabTalk object. (And make sure they're in the active layer so that Origin is aware of them.)
...You need Origin 7.0 SR2 in order for Origin C to recognize LabTalk as a keyword.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 02/19/2004 08:36:40 AM
Edited by - Mike Buess on 02/19/2004 08:53:25 AM |
| cmndmn |
Posted - 02/19/2004 : 07:17:13 AM Please tell me where I can find information or tutorial about UIM objects. Methods, properties or others. Thanks! Dmitriy. |
| cmndmn |
Posted - 02/19/2004 : 03:32:15 AM Sorry, but I have error in the string: using status = LabTalk.STATUS; - Variable "" not declared
..."using status =" is just for convenience. This will also work
int v5 = LabTalk.STATUS.v5; In such case is the same. :-(
Dmitriy. |
| Mike Buess |
Posted - 02/18/2004 : 5:03:51 PM If your UIM object is named STATUS you can do it like this...
using status = LabTalk.STATUS; int v5 = status.v5; // fifth value
..."using status =" is just for convenience. This will also work
int v5 = LabTalk.STATUS.v5;
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 02/18/2004 5:45:49 PM |