Experiment Wizard

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
chaix
Posts: 8
Joined: Friday 26 April, 2019 - 15:06

Experiment Wizard

Post by chaix »

Hi everyone,

when I open the Experiment Wizard and I click on "Start Experiment" button, the Experiment Wizard start the simulations and when it finished it shows the "Analyze Experiment Result" form.
Could you tell me which lines of code produce this opening?
Because through the Gui Builder I tried to look at the code of the Experiment Wizard form but I can't understand it.

Thanks in advance.

Chaix
User avatar
Fred
Posts: 22
Joined: Wednesday 17 November, 2010 - 12:06

Re: Experiment Wizard

Post by Fred »

Hi Chaix,

There are 2 ways you can get to this form.

Option 1: Select the menu option in the Simulate menu.

Code: Select all

KernelFnc([analyze experiment results])
Option 2: After the experiment.
Open the Atom Editor and select the Experiment Support atom in the System group.
Select the OnMessage event.
Search for frmAnalyzeWiz. In my code line 882.

Gr. Fred...
chaix
Posts: 8
Joined: Friday 26 April, 2019 - 15:06

Re: Experiment Wizard

Post by chaix »

Hi Fred,

thank you very much for the reply, I used the KernelFnc and it works.

To get to generate the report I added the lines GuiControl([btnNext]) and GuiRun([Click]) to open the Standard Report form and it works, but when I added the lines GuiControl([btnGenerate]) and GuiRun([Click]), I get this error "GUIControl 'btnGenerate' not found!".

How can I solve this problem?

And then how can I save the results table without opening the dialog so that everything is automated?

thanks in advance.

Chaix
User avatar
Fred
Posts: 22
Joined: Wednesday 17 November, 2010 - 12:06

Re: Experiment Wizard

Post by Fred »

Hi Chaix,

You have opened a new form. That does not mean it is internally the active form. Use GuiSelect (see help) to make the new form active.

With regards to the table data, you could use TableAsText to write the data to a string and then use save this string to a file by code. Have a look at the Filexxx commands to find out how to do this.

Gr. Fred...
chaix
Posts: 8
Joined: Friday 26 April, 2019 - 15:06

Re: Experiment Wizard

Post by chaix »

Thank you very much for your support Fred.

I did it. :D

Chaix
Post Reply