• 易迪拓培训,专注于微波、射频、天线设计工程师的培养
首页 > HFSS > HFSS help > Callback and State API

HFSS15: Callback and State API

录入:edatop.com     点击:

State is managed somewhat simply but in a limited fashion. All the API methods take a final dictionary argument. This dictionary is limited to using string keys and number or string values. Within this limitation, simply add new keys, read old keys, clear the dictionary etc and it will be persisted across functions calls and across Updates even. When the Iterations Completed property is rest, the dictionary is also cleared out.

It is advisable for the callback script to initialize the dictionary at Iteration 1.

All the API methods use a subset of the following arguments  


Only return values from BeforeIterationEx are processed. Returns from all other functions are discarded

1. BeforeIteration(IterationNumber, ContainerList, State): This method is called before each iteration. Ideally used to initialize the state dictionary, open editors as required or initialize setups as needed for each iteration.

2. BeforeIterationEx(IterationNumber, ContainerList, State): Similar to the BeforeIteration method except that this allows you to control the number of iterations via the return value

• Return: "more" to request one more iteration

• Return "last" to indicate that this is the last iteration

• Any other return (including none) will be treated as a return of "last" and terminate iterations.

3. AfterIteration(IterationNumber, ContainerList, State): This method is called after each iteration. This can be used to copy result files over, check results, implement any possible convergence calculations, logging of results, etc.

4. BeforeContainerRefresh(IterationNumber, Container, ContainerList, State): Is called before each of the coupled containers is refreshed. The "Container" argument represents the container about to be refreshed.

5. AfterContainerRefresh(IterationNumber, Container, ContainerList, State): Is called after each of the coupled containers is refreshed. The "Container" argument represents the container just refreshed.

6. BeforeContainerUpdate(IterationNumber, Container, ContainerList, State): Is called before each of the coupled containers is Update (after a refresh). The "Container" argument represents the container about to be updated.

7. AfterContainerUpdate(IterationNumber, Container, ContainerList, State): Is called after each of the coupled containers is updated. The "Container" argument represents the container just updated.

If the callback scripts uses other files to send commands to various containers (vb, js, apdl, python etc), all of those files are best saved under the user_files directory. This allows you to use the FBGetUserFilePath(str) to get the absolute path of the file and allows the files to be packaged with any created archive.

Utility Functions  


Output/Debugging Functions


HFSS 学习培训课程套装,专家讲解,视频教学,帮助您全面系统地学习掌握HFSS

上一篇:Calculating the PV Impedance
下一篇:Calculating the Quality Factor

HFSS视频培训课程推荐详情>>
HFSS教程推荐

  网站地图