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
 linking columns directly to vectors

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
bnahir Posted - 09/14/2006 : 4:09:21 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System: Windows XP

I have a hopefully easy question about vectors, datasets, and columns. I want to manipulate the data from a column in a worksheet without changing the original data. Currently, the only way I know to do this is to attach the column to a dataset then set a vector equal to the dataset. While this works just fine, it seems to be a waste of memory. So my question is whether it is possible to directly extract the data from a column and store it in a vector or if this intermediate step is absolutely necessary.

Thanks,
Ben
1   L A T E S T    R E P L I E S    (Newest First)
Deanna Posted - 09/15/2006 : 01:25:42 AM
Usually, there are two ways to get the data from a column and put it in a vector. If the vector is defined in either way, the changes the vector will affect the column in the worksheet.

1.

Worksheet wks=Project.ActiveLayer();
Column col(wks, 1);
vector v(col);


2.

Worksheet wks=Project.ActiveLayer();
Dataset dsB(wks,1);
vector vB( dsB, FALSE ); // Copy Dataset dsD to vector vD removing missing values


Deanna
OriginLab GZ Office

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