On a Python script, I tried to save experiment with the help of the function AMECreateExperiment.
Unfortunately this function isn't recognize.
I used the syntax AME.AMECreateExperiment(....
AME.AMEGetGlobalParameter and AME.AMESetGlobalParameter are successful
Do I have to import a special module from AME?
Thanks for any help
Solved! Go to Solution.
First of all I would like to wish you all the best for this new year.
Sorry for not replying earlier.
Here a part of my script, which fails at the third line In the help you send me, I can see for example that AMERunSimulation is also avaiable in the ame_apy module.
In my case, I don't have any problem to run my case with the function AMERunSimulation.
But with AMECreateExperiment, I get the error " AttributeError: 'module' object has no attribute 'AMECreateExperiment' " My script is launched from the scripts panel in AMESim (So my circuit is already opened)
AME.AMESetGlobalParameterValue('pout',550) AME.AMERunSimulation() AME.AMECreateExperiment(0,'exp1','550bar')
If I understand correctly the issue is that you are trying to use a function (AMECreateExperiment) from the Circuit API (ame_apy) that does not exist in the embedded API (AME).
The Circuit API is a module that lets you create an Amesim instance without a user interface. It lets you do the same things as Amesim but without having an Amesim window visible. It uses an additional Amesim license, so if your license is limited to one instance, you cannot use the circuit API at the same time as Amesim.
The embedded API lets you control the current instance of Amesim. The advantage it that it does not require an additional license. The limitation is that not all functionalities have been implemented.
I hope this clarifies things.
I come again because of same kind of issue.
In my app I want to get the error Level.
I thought I could use AMEGetErrorLevels(), but it seems not be recognized in the API
How could I get the error level of my Run?
Thank you for any tip
Dear @mAx ,
I have confirmed that the AMEGetErrorLevels function is still present in the Circuit API (ame_apy).
But this function does not exist in the embedded API (AME). The elbedded API will generate standard python exceptions if problems occur, for example AccessError if the simulation failed or was stopped.