DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Script runs not corrextly for first time

Solved!
Go to solution

Hello,

i have kind a strange problem.

Always wenn i run my script first time (after opening Diadem), it works not corretly. Specificly creating a report goes wrong.

When i start the script for second time (and each additional time) everything works fine and correctly?!

For understand:

- I do some (mathemtical) analyse  - always works correctly

- Load/Append prepared ReportLayout, add curves, create text objects - doesn't work for the first time, then it alwas works correctly

  The mistake is, that all curves (that should be in several appended layouts and text objects) are added in the first loaded report sheet (though the reportsheets were appended)

 

As i said, when i start the script second time (and each additional time) everything works fine as it should?!

 

Thanks

0 Kudos
Message 1 of 5
(5,374 Views)

HI AndiMEC,

did you try to debug step by step your VBScript? Are there errors?

Do you have a sample script that can be used to reproduce the issue?

Best regards

 

Andrea 

0 Kudos
Message 2 of 5
(5,341 Views)

Hello,

yes i tryed with debugger step by step. No errors. Ironically with debugger step by step everything works fine (even for he first time)

It looks like, when i run the script for the first time, the appended report sheets are not active, because all curves are added in the first report sheet.

But why works it wrong only for the first time and then everything works fine?

 

Thanks

0 Kudos
Message 3 of 5
(5,332 Views)

Could you write a small script which reproduces the issue and post it here with the necessary files?

Best regards

 

Andrea

0 Kudos
Message 4 of 5
(5,329 Views)
Solution
Accepted by topic author AndiMEC

Hi

i think i solved the problem by myself.

I inserted "Call PicUpdate" in between as a intermediate step, and now it works fine (even running the script first time)

Thanks everybody

0 Kudos
Message 5 of 5
(5,301 Views)