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
 when to use Dataset or Datarange class?

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
ahlers01 Posted - 05/31/2010 : 4:01:28 PM
Origin Ver. 8.0 and Service Release 5
Operating System: Win XP Prof.

Again an OriginC-beginner's question:

When I want to manipulate data in a worksheet: is there a rule when it's better to use the Dataset class or the Datarange class?

Or is this an irrelevant question because I do not understand the classes?

2   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 06/01/2010 : 5:01:11 PM
Please be careful when using Dataset and passing it to external DLL like NAG. Dataset maps a column in a worksheet to a vector, without making a copy. By default, worksheet columns are Text & Numeric, so you cannot get a pointer to array of double from it, and if you need to pass it as a reference to a vector or to pass it to external DLL, you need to make a copy into a vector first.


CP
Penn Posted - 05/31/2010 : 11:01:53 PM
Hi,

Dataset can be used as a vector, but DataRange can not. DataRange is a combination of full or partial Datasets, that is DataRange can be a column, multiple columns, a block of worksheet, multiple blocks of worksheet, but Dataset can only be a column. From this point, DataRange is more powerful than Dataset, especially when making a plot. A DataRange can hold the X, Y, Z and Error columns together. DataRange is recommended.

You can refer to some examples in this page.

Penn

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