![]() ![]() ![]() ![]() ![]() |
|
微波射频仿真设计 |
|
首页 >> Ansoft Designer >> Ansoft Designer在线帮助文档 |
Windows HPC Integration > Using an IronPython Program for Integration with a SchedulerThis section describes how to create an IronPython program for integration with a scheduler. Each such program is used for a single specific scheduler environment. If the program is installed with a valid name and in the correct location, then it will automatically be loaded and used by Ansoft tools. Installation Details The IronPython program must be installed in the schedulers subdirectory of the Ansoft installation directory. For example, if the Ansoft installation directory is C:\Program Files (x86)\Ansoft\Designer7.0, then the IronPython program must be installed in directory C:\Program Files (x86)\Ansoft\Designer7.0\schedulers. The program file extension must be ".py". Select the program name so that it does not conflict with other IronPython programs in the same directory. If the Operating System or file system treat file names in a case sensitive manner, the file extension ".py" must be lower case. Python Programming Notes The scheduler program will be run in the IronPython environment both on Microsoft Windows and on Linux. There are some differences between IronPython and CPython. The version of IronPython in use as of June 9, 2011 is 2.6.1. Implementation Details The program must contain the following: Import the ISchedulerPluginExtension interface as follows: from Ansys.Ansoft.SchedulerPluginDotNet import ISchedulerPluginExtension Define a class which implements the ISchedulerPluginExtension interface. In this document, this class is named SamplePluginExtension, but any class name may be used. The class member functions are described in the next section. The class definition will look similar to the following: class SamplePluginExtension(ISchedulerPluginExtension):
def GetName(self): return "SamplePluginExtension"
def GetDescription(self): return "Example python script plugin extension" . . . Include the following line in the program so that the class that you have defined, SamplePluginExtension, is loaded by the infrastructure: ExtensionRegistrar.RegisterPluginExtension(SamplePluginExtension()) The infrastructure will make the EntensionRegistrar object available in the environment where the program is loaded. Each of the functions to be implemented in the SamplePluginExtension class is described below. GetName IsProductLaunchedInYourEnvironment GetMessageStringToRegisterForSigTerm GetMachineListAvailableForDistribution HFSS视频教程 ADS视频教程 CST视频教程 Ansoft Designer 中文教程 |
Copyright © 2006 - 2013 微波EDA网, All Rights Reserved 业务联系:mweda@163.com |