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
 Store additional info in Worksheet
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

TreeNode

64 Posts

Posted - 02/28/2011 :  08:51:12 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: Origin 8 SR6
Operating System: Win XP

Hi,

I want to store additional information in a Worksheet like a type number, so that I can
check at every time, which type of data it holds, for example.
I dont want to use the name for this issue, because the name should stay human readable.
Is there another data member in Worksheet class (or perhabs Layer class) I can use for my intention?

I found, that PageBase class for example provides the method PageBase::GetType()
Would be great if other classes, like Worksheet would have a data member, where user could
store a number, or a vector<int> to store more than one number, to get additional information about
this object, at any time.

Anybody an idea to succeed with this?

|-- TreeNode
...|-- a??
...|-- ha!!

Penn

China
644 Posts

Posted - 03/01/2011 :  01:20:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi TreeNode,

Maybe you can try to use the methods about storage in OriginObject class, such as GetBinaryStorage, PutBinaryStorage, etc. You can see some sample code here.

Penn
Go to Top of Page

TreeNode

64 Posts

Posted - 03/01/2011 :  05:04:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much!
It works fine. But I think there is a bug, when strStorageName contains 'space'
like:
strStorageName = "Data info";

Then the PutBinaryStorage() method fails. When using this name:
strStorageName = "DataInfo";

everything is ok.

|-- TreeNode
...|-- a??
...|-- ha!!
Go to Top of Page

Penn

China
644 Posts

Posted - 03/02/2011 :  9:05:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi TreeNode,

This is by designed, it does not allow containing space in storage name. We have updated our our document about this, see here. Thank you for pointing this out.

Penn

Edited by - Penn on 03/02/2011 9:08:10 PM
Go to Top of Page

darronwolflx

USA
2 Posts

Posted - 03/22/2011 :  4:36:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Penn,
Thanks a lot for sharing the solutions. I checked the links and it helped me a lot, being new to all these it was an enriching experience to learn from the comments.
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