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
 Defering GUI Updates / Best way to speed up creati
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hofmaale

20 Posts

Posted - 10/10/2013 :  07:22:35 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi there,

I've got a Origin-C based import "script" that reads measurement data from one of our instruments and then creates some graphs and calculates often needed quantities, all upon hitting a custom toll-button. Graphs, Worksheets & Notes get created in a custom folder-structure based on sample numbers and sub-measurements taken.

But, when importing "more" data, let's say 20 measurements, the number of created objects (Worksheets, Graphs, Folders etc.) gets quite large - and as the GUI updates it's view each time a new object is created or folder selected, the creation takes quite long.

Is there a possibility to either
a) defer updates to the GUI until the operation has finished (like BeginUdpate() and EndUpdate() that exist for almost all windows controls, or e.g. "Defer Panel Updates" in LabView)
b) create all these things in the background?

Current Operation:
- create&select Folders using Folder.AddSubfolder and Folder.Activate
- create new Graphs/Worksheets/Notes etc. using GraphPage.create / Worksheet.create etc.

Thanks in advance

Alexander

Origin Ver.: Pro 9.0.0G (32 Bit) SR2
Operating System: Win XP x86

Edited by - hofmaale on 10/10/2013 07:23:19 AM

rlewis

Canada
253 Posts

Posted - 10/10/2013 :  3:49:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
When creating Page objects (e.g. WorksheetPage, GraphPage, Note) you could use the CREATE_HIDDEN flag ...

e.g.
WorksheetPagePage wp;
wp.Create("Origin.otw",CREATE_HIDDEN);
Go to Top of Page

hofmaale

20 Posts

Posted - 10/11/2013 :  04:25:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ah, so at least Objects other than folders won't trigger an update, I'll check that. Thanks!

Is there any possibility to create Worksheets in other folders but the active one?
Go to Top of Page

rlewis

Canada
253 Posts

Posted - 10/12/2013 :  6:29:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
As far as I can tell, Pages can only be created in the active folder ...
However, once created the pages can be moved to another folder using the Folder.Move() method ...
Instead of activating the newly created folders, you could try creating the Pages and move them to the target Folder ...
In principle, such an approach should reduce the number of GUI updates ....
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