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
 Q: Accessing Page.Info elements
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hajo_old

Germany
141 Posts

Posted - 02/24/2003 :  12:24:56 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I want to access the page.info structure I have stored within a worksheet, but it doesn't work!

This is what I did:

writing page.info during creating workbook:


void XXwriteGlobalHeader1( _STRUCT_EV_DATA* structEVData, int structPos, Page actualProjPg)
{
// Header Informationen initialisieren ...
actualProjPg.Info.Add("HEADER");
using Info_Header = actualProjPg.Info.HEADER;

Info_Header.AddSection("GLOBAL"); // globale Angaben
using IH_Global = Info_Header.GLOBAL;
IH_Global.GHVer$ = SVDO_GLOBAL_HEADER_TYPE_1;
IH_Global.WKSName$ = actualProjPg.GetName();

Info_Header.AddSection("VA"); // Versuchs-Auftrag
using IH_VA = Info_Header.VA;
IH_VA.TestBench$ = structEVData->testbench;
IH_VA.MeteringUnit$ = structEVData->meteringunit;
IH_VA.Datum$ = structEVData->date;
IH_VA.InjNr$ = structEVData->strInj;

// SubSection "WorkingPoint"
Info_Header.AddSection("WORKINGPOINT");
using IH_WorkingPoint = Info_Header.WorkingPoint;
IH_WorkingPoint.BPName$ = structEVData->strMP[structPos];
IH_WorkingPoint.TXT_EINSPRITZVERLAUF$ = structEVData->strEvTestFile[structPos];
IH_WorkingPoint.FUP = structEVData->vPmain[structPos];
IH_WorkingPoint.TiMain = structEVData->vTimain[structPos];
IH_WorkingPoint.QMain = structEVData->vQmain[structPos];
IH_WorkingPoint.Energie = structEVData->vEnergie[structPos];
}



While processing some calculations I need some values I've written to the page.info structure. now I want to read them out.

e.g.:



double qMain;
string strTestBench;

qMain = wks.Info.HEADER.WORKINGPOINT.QMain;
strTestBench = wks.Info.HEADER.VA.TestBench$;



this doesn'work!!

What is going wrong here?

Thanks
Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1

Mike Buess

USA
3037 Posts

Posted - 02/24/2003 :  3:09:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hajo,

I'm not sure what's going on here because I access info structures in this manner frequently. A few shots-in-the-dark...

1) Is wks of type Page?
2) Does wks refer to the actual worksheet page on which your info structure was created?
3) When the worksheet is active and you enter "page.info.=" in the script window, does your info structure look correct?

You might get a handle on all of those questions by adding these two lines to your "read out" code...

LT_set_str("%W",wks.GetName());
LT_execute("%W!page.info.=;");

Mike Buess
Origin WebRing Member
Go to Top of Page

hajo_old

Germany
141 Posts

Posted - 02/25/2003 :  04:24:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello, Mike

thanks for your hints.

with wks -> type Page, reading out an double value of the page.info structure works. But I still have problems reading a string!

Thanks so far
Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1
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