Functions for Equipment Contents Auto Initialization Variables

These methods are used for setting and getting the options for auto initializing of input streams in the flowsheet. They are all functions that return a Boolean value, which is True if the task was successful and False if the task failed. They include:

         GetEquipContentsAutoInitOptions(equipName As String, varID As VarID, val) With this function you may retrieve all relevant setting that appear in the Initial Equipment Contents: Initialization Options Dialog. The equipName is the name of the equipment you wish to auto initialize its contents. For a list of the Variable ID’s that can be used with this function, see Auto Initialization Variables.

         SetEquipContentsAutoInitOptions(equipName As String, varID As VarID, val) With this function you may set all relevant setting that appear in the Initial Equipment Contents: Initialization Options Dialog. The equipName is the name of the equipment <equip1> you wish to auto initialize. It may be initialized by another equipment <equip2> which you may also set in this function through the VARIANT val argument. For a list of the Variable ID’s that can be used with this function, see Auto Initialization Variables.

         AutoInitEquipContents(equipName As String) This function is used to Automatically initialize the contents of the equipment when either the Initialize with Own Contents or Auto-Initialize from Contents of Other Equipment has been checked in the Initial Equipment Contents: Initialization Options Dialog.

         AutoInitAllStreamsAndEquipContents This function can also be used to auto initialize all the streams and equipment contents that have been set to be initialized by other sources.

Error Related Methods

These methods are used for error reporting. They are all functions that return a Boolean value.

         GetCOMErrorMsg(val As VARIANT) This function returns True if it was successful in obtaining the error message and False if it was not. The argument val (which must be defined as a Variant) contains the string with the error message.

         IsCOMSimDataComplete() This function returns True if the data exchange using the COM functions was consistent. If the function returns False it means that some data that you have set using the COM functions is inconsistent and that you cannot proceed with the simulation. In this case you can use the GetCOMErrorMsg(val) to find out what went wrong.

      GetOutputErrorMsgs(val as VARIANT, severity As ErrorSeverity) This function can be used to retrieve all error messages or error messages of a specific severity type, which have been echoed out on the Error Output tab in the SuperPro Designer application window. If the error severity is zero (integer defined variable set to 0), all generated error/warning messages will be retrieved.

      AreThereAnyErrorMsgs(severity As ErrorSeverity) One can call this function to find out if there are any error messages produced for example after solving the Mass & Energy Balances. If the error severity is zero (integer defined variable set to 0), the function will check to see if any kind of error message was produced.

Severity option

Explanation

unknown_ES

No severity level (zero) All messages will be retrieved

noMessagesTSHD_ES

No messages will be retrieved

severeError_ES

Severe errors and above will be retrieved

nonSevereError_ES

Non-severe errors and above will be retrieved

warning_ES

Warning messages and above will be retrieved

info_ES

Informative only messages and above will be retrieved

internalError_ES

Internal errors and above will be retrieved

internalWarning_ES

Internal warnings and above will be retrieved

allMessagesTSHD_ES

All echoed errors/warnings will be retrieved

ErrorSeverity options

For VBA examples that apply these methods, see Error Handling Scripts.

Export Methods

Through the ProDesigner COM server it is possible to export Tables, Charts or whole reports to files of your choice or to the clipboard and then to your application project (Excel, Word, etc). Special methods exist which can handle most of the common options the user may wish to apply to his exported table, chart or report.