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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 update GraphObject on worksheet from OC

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
irek Posted - 05/18/2003 : 2:19:21 PM
Hi All!
I need to show some information from header of my binary file
at the top of worksheet like it works in "BinaryImport" sample.
But for my worksheets code from this sample doesn't work.
For example for Object with text in it "File Name" I am trying to do
GraphObject goName;
goName = wksData.GraphObjects("File Name");
I get:
goName - Invalid Object
Unfortunately it is impossible to see the "Label Control" properties
of all GraphObjects in ScanWks.OTW - may be here I do mistake.
Could someone explain how to reach the GraphObject on worksheet template from OC? And what kind of "Label Control" properties I should set?
Thank you in advance!
2   L A T E S T    R E P L I E S    (Newest First)
irek Posted - 05/19/2003 : 05:32:36 AM
Thank you Mike!
Everything work now.
Irek
Mike Buess Posted - 05/18/2003 : 4:54:00 PM
The objects in ScanWks.otw are just non-selectable text labels. Their label control properties can be viewed/edited if you select Edit->Button Mode. But all you need to know are their names, which you can figure out by listing the objects to the script window (list o). The easiest way to get the label text is probably with LabTalk.Object.Property. For example, the "File Name" label is called IDFileName and you can get at its contents like this...

string goName = LabTalk.IDFileName.text$;

You'll need to get rid of the "File Name:" prefix to get the file path.

...If you want to use GraphObject then something like this will work

void test()
{
Worksheet wksData = Project.ActiveLayer();
GraphObject goFileName;
goFileName = wksData.GraphObjects("IDFileName");
out_str(goFileName.Text); // read what's already there

string strFileName = "C:\\Temp\\Temp.txt";
goFileName.Text = "\\b(File Name:) \\v( " + strFileName + ")"; // replace it with something else
}

Once again, you have to strip off the formatting to get at the file path.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/18/2003 7:09:18 PM

Edited by - Mike Buess on 05/18/2003 7:10:11 PM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000