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
 LabTalk Forum
 LabTalk script after import

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
dice Posted - 03/28/2013 : 06:48:45 AM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 9.0.0G SR1
Operating System: Windows 7 Enterprise

Hello!

I wrote a script which processes some data after the import of some files. Importing the Data works fine. If I start the script on its own (I copied it into Custom.ogs and start it with the Custom Routine button[1]) everything works fine.

But starting the script directly after importing (in this example with
run.section(custom,main)
) I encounter a problem, it seems the script is started twice.

I already have a workaround: if the Origin Directory in which I import the files (per drag and drop) is not empty (so already has a workbook in it) everything works fine also.

This seems like a bug to me.

The import options are:
* Import Mode: Start New Sheets
* Run script after all files imported

Also I think I remember that this problem also occurred in older Origin Versions, I just could work around this (with Import Mode: Start New Books), but this time need Start New Sheets


[1] Just switched two English I'm using the German GUI, so I'm not sure if that is the right translation.

1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 03/29/2013 : 10:06:47 AM
I could not find any evidence of a problem in 9.0 SR1.

I tested by creating an import filter set to Start New Sheets with a script set to "Run script after all files imported" where the script was:
run.section(custom,main);
and where the CUSTOM.OGS file contained
[Main]
loop(ii,1,page.nlayers)
{
page.active = ii;
wo -s 0 0 0 0;
colreverse;
}

After import, all data was in reverse order as expected. I tested by using the GUI and by this script:
dlgfile gr:=*.dat mu:=1;
impfile filtername:=test location:=2;
and both cases worked.

If you have a script which is failing, please post the import code and a few lines before and after.

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