-
Notifications
You must be signed in to change notification settings - Fork 8
WBInterface help
The following is valid for WBInterface version 2.0.5
out_file
: returns a name of a file in which output parameters would be written
full_file
: returns a name of a file in which Workbench report would be written
DPs
: returns a list of Ansys Workbench Design Points
DPs_count
: returns a tuple of Design Points count: (imported, present)
filename
: returns a name of an opened project
logfile
: returns a name of a log file
isopen
: returns if a project has been opened
parameters
: returns a tuple of dicts (input parameters, output parameters)
Input arguments (with default values):
logger = None
In case of a logger = None
WBInterface will automatically create a Logger
class from a Logger
module with filename='log.txt'
. You can pass any existing Logger
class object as an argument.
out_file='output.txt'
Sets a name of a file where output parameters will be written.
full_report_file='full_report.txt'
Sets a name of a file where Workbench report will be written.
control_file_template='*_control.csv'
A string template to search for a control file. Control file is a csv file which contains a list of Workbench inpup/output parameters. Example:
# type 'no' to skip inputs
p3,p2
# type 'no' to skip outputs
p1,p4,p5
input_file_template='*_input.csv'
A string template to search for an input file. Input files is a csv file which a list of input parameters specified in a control file in the same order. Each line is a new Design Point. Example:
#p3,p2
10,200
30,400
50,600
This will create 3 Design Points.
csv_delim=','
Sets a delimiter for control and input files.
csv_skip='no'
Sets a string for input file that will indicate there are no parameters specified.
loginfo=None
Provides a prefix for each line written by a logger inside WBInterface
. If loginfo=None
the constructor will set this values to a class name. Each line written by an instance of the class will have this format:
(1) [2020-04-23 21:46:56] WBInterface|| Some Message
If loginfo='SomePrefix:'
then each line will have this format:
(1) [2020-04-23 21:46:56] SomePrefix: Some Message