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
 Q: Accessing Page.Info elements

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
hajo_old Posted - 02/24/2003 : 12:24:56 PM
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
2   L A T E S T    R E P L I E S    (Newest First)
hajo_old Posted - 02/25/2003 : 04:24:03 AM
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
Mike Buess Posted - 02/24/2003 : 3:09:47 PM
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

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