The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Getting a item value from UIM status button
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cmndmn

Russia
Posts

Posted - 02/18/2004 :  1:16:48 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi All!

How I can get a int value of items from hand-made creating STATUS button (by UIM)?

Mike Buess

USA
3037 Posts

Posted - 02/18/2004 :  5:03:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cmndmn

Russia
Posts

Posted - 02/19/2004 :  03:32:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

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.
Go to Top of Page

cmndmn

Russia
Posts

Posted - 02/19/2004 :  07:17:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please tell me where I can find information or tutorial about UIM objects. Methods, properties or others.
Thanks!
Dmitriy.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 02/19/2004 :  08:34:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cmndmn

Russia
Posts

Posted - 02/19/2004 :  09:09:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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?
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 02/19/2004 :  09:26:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cmndmn

Russia
Posts

Posted - 02/19/2004 :  10:29:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot, Mike! It helped.

Dmitriy.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000