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
 XYRange::GetBookSheet fails in X-Function.

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
Alex-qwerty Posted - 02/28/2010 : 08:35:11 AM
Origin Pro 8.0 SR 6; WinXP SP3.
Method GetBookSheet of XYRange returns FALSE when X is not assigned (or assigned as <autoX>).
For example, if Worksheet has not a column designed as X, then columns are plotted with Row Number at X-axis. If I try to use a Data Selector at that plot and to pass obtained range to my X-Function as input parameter of type XYRange, then my function cannot resolve the names of Book and Sheet of plotted column.
1   L A T E S T    R E P L I E S    (Newest First)
folger Posted - 03/02/2010 : 01:47:06 AM
DataRange::GetBookSheet is used to get book and sheet name of the index-th x range, please refer to :

http://ocwiki.originlab.com/index.php?title=OriginC:DataRange-GetBookSheet

In your case, there is no X range specified in dataplot, so GetBookSheet will not work. X range is considered as valid subrange for regular datarange. However, for XYRange, it makes more sense to use Y. We will fix it with 81SR2, #15157.

As a workaround for now, maybe you can try this :

BOOL	GetBookSheetFromDataPlot(string& strBook, string& strSheet, const DataPlot& dp)
{
	string	strRange;
	dp.GetRangeString(strRange, NTYPE_BOOKSHEET_XY_RANGE);
	return okutil_get_book_sheet_info(&strBook, &strSheet, strRange);
}


Originlab Corp.
There is always something

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