|
Mike Buess
USA
3037 Posts |
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 |
 |
|