Highlighted

AMECreateExperiment

Genius
Genius

Hello,

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

Maxime

 

 

12 REPLIES 12

Re: AMECreateExperiment

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

this function is in the Circuit API and should be available in the ame_apy module:

image.png

image.png

Re: AMECreateExperiment

Genius
Genius

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')

 

Re: AMECreateExperiment

Siemens Genius Siemens Genius
Siemens Genius

Dear Maxime,

 

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.

 

Best regards,

ElecKid.

Re: AMECreateExperiment

Genius
Genius

Hello @ElecKid

 

Thanks for the explanations.

 

So far I understand :

*Circuit API (ame_apy) calls AMESim without GUI

*embedded API (AME) calls AMESim function within GUI

Am I right?

 

 

 

Re: AMECreateExperiment

Siemens Genius Siemens Genius
Siemens Genius

Exactly.

 

So you must choose the correct API for your specific needs.

 

Best regards,

ElecKid.

 

Re: AMECreateExperiment

Genius
Genius
Great Thank you!

Re: AMECreateExperiment

Genius
Genius

Hello,

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

Maxime

 

Re: AMECreateExperiment

Siemens Genius Siemens Genius
Siemens Genius

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.

 

Best regards,

ElecKid.

 

 

 

Re: AMECreateExperiment

Genius
Genius
Thanks @ElecKid,
But how can I get those standard python exceptions from my app ?
:-/