Author |
Topic |
|
hofmaale
20 Posts |
Posted - 10/10/2013 : 07:22:35 AM
|
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
|
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); |
|
|
hofmaale
20 Posts |
Posted - 10/11/2013 : 04:25:24 AM
|
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? |
|
|
rlewis
Canada
253 Posts |
Posted - 10/12/2013 : 6:29:42 PM
|
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 ....
|
|
|
|
Topic |
|
|
|