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
 LabTalk Forum
 Project level loose datasets - methods?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

aplotnikov

Germany
169 Posts

Posted - 04/05/2022 :  11:04:54 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2022 (64-bit) SR1 9.9.0.225
Operating System: Win10

Hello,

I found that the use of Dataset object methods with project-level datasets is not supported - as distinct from session-level ones. For instance, GetSize() method works only with session-level datasets. Are the project-level datasets objects at all?

ProjectEvents.OGS:
[AfterOpenDoc]
win -o Book1 {
  dsTest1 = col(A);
  @glob=1;
  dataset dsTest2=col(A);
}

>>dsTest1.getSize()=
Mismatch double quote: DSTEST1.GETSIZE()
>>dsTest2.getSize()=
dsTest2.getSize()=10


What is the reason of this limitation? It is VERY annoying.

Regards,

Alexei

cpyang

USA
1406 Posts

Posted - 04/05/2022 :  1:58:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
What is the reason you need to create them?
Project level Dataset are loosed dataset and will accumulate in the project.

If you want to access loose dataset, you need to declare a range variable, like in your case

range ds1=[??]dsTest1;

then you can do ds1.GetSize();

See
https://www.originlab.com/doc/en/LabTalk/guide/Range-Notation#Loose_Dataset

CP
Go to Top of Page

aplotnikov

Germany
169 Posts

Posted - 04/05/2022 :  8:44:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I want to keep between sessions the lists of filtered parameters from one worksheet used to filter another worksheet. I use filtering to visualize relatively small data amounts from a really huge worksheet to provide fast data scrolling by multiply criteria with programmed UI elements. It works fine (or almost fine taking into account certain surmountable problems with filtering from script) - it is relatively simple to implement and it works fast enough for my purposes (or simply fast ). A solution with thousands small worksheets is much more complicated. But I need to generate these lists each time I open the project that might be unnecessary if I could keep the lists as project level datasets. Undoubtedly I can use worksheets to keep these data but this approach is not so elegant.
I'm just wondering what is the reason to have "loose datasets" without methods and "another loose datasets" with methods? Why not to unify them?

AP
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