Вы находитесь на странице: 1из 109

COM Library

This appendix is dedicated to the Component Object Model (COM) feature available in
SuperPro and EnviroPro Designer. The COM feature has been available since version 6.0
and is constantly updated to include additional options of the above software packages. The
main essence of COM is to enable inter-process communication and dynamic object
creation through a variety programming languages. Code has been added in SuperPro &
EnviroPro so that the applications behave as an Object Linking and Embedding (OLE)
Automation Server. For the rest of this document we use Pro-Designer to refer to either the
SuperPro Designer or the EnviroPro Designer applications and similarly we use Pro-
Designer COM Server to refer either to the EnviroPro or SuperPro automation server.

Functionality-Applications

Using the Pro-Designer COM Server you can now explore windows interoperability
combining several other applications (such as Microsoft Excel, Microsoft Word, Microsoft
Visual Basic, and Visual C#) with Pro-Designer. The Pro-Designer COM Server can thus
be used by client applications to perform various tasks including:

Showing the Pro-Designer application, opening and closing files.

Solving the Pro-designer simulation case and performing economic calculations.

Data exchange between the Pro-Designer simulation variables and other applications.

Exporting of Pro-Designer reports, charts, tables and pictures to specified files or to the
clipboard.

This functionality has useful applications in:

Data transfer between various applications and databases.

Creation of custom reports fro design, economic evaluation, and environmental


assessment purposes.

Sensitivity analysis studies for Pro-Designer simulation cases.

Risk analysis studies for Pro-Designer simulation case.

Prerequisites

The object exposed by the Pro-Designer server is the The Designer Library. The Designer
Type Library is common to SuperPro and EnviroPro Designer Servers. The methods and
members of the Designer Type Library, are explained in Pro-Designer COM server
Methods and the variables that can be accessed with these methods are listed in Accessing
Pro-Designer Variables with COM. Use of these methods to inter-operate with other
windows applications (such as MS Excel, MS Word, etc.) requires the use of a common
scripting language, for this purpose Visual Basic for Applications (VBA) was chosen to
illustrate this, see VBA Sample Scripts for more information. These methods can also be
used to inter-operate with other windows programming environments (such as Visual C#).
For more information on the latter please, see Visual C# COM Application.

In order to get started using the Pro-Designer OLE Automation Server follow the
instructions in Setting Up The Project.

The Pro-Designer COM Server is not intended as a tool for creating a simulation case, but
rather as a tool for manipulating the variables of existing process files in order to further
analyze and evaluate the process. It can be an indispensable tool for engineering parametric
studies of process design or/and economic analysis. An example of such study is illustrated
in Sensitivity Analysis Example. Furthermore it allows integration of Pro-Designer with
other windows applications such as stochastic risk-analysis tools for performing uncertainty
and risk-assessment studies on ambiguous process files as described in Risk Analysis
Example.

Getting Started
Useful information for getting started to use the COM technology, and setting up your
project using Excel and the Visual Basic Editor (VB Editor) is provided in this section.
Visual Basic for Applications (VBA) is Microsofts common scripting language that
facilitates the interoperability of various applications. Familiarity with VBA is important
for taking full advantage of the Pro-Designer COM Server, however this manual provides
the basic examples one can follow to carry out simple tasks.

Setting Up The Project

For the following procedure we will be using the Excel spreadsheet example ComEx1.xls
along with the ProDesigner simulation case ComEx1.spf. This excel spreadsheet contains
many useful scripts for using the COM functions. It can be also used for a parametric study
as described in the Sensitivity Analysis Example. Before you start using this example you
must perform the following tasks:

1. Open the ComEx1.xls file with MS Excel.

2. Choose Enable Macros when opening excel file or visit the Macro Security settings
and enable all macros (MS Excel 2007-2013).

3. Specify the path and name of the Pro-Designer file in designated cells
(C:\Designer\ComEx1.spf).

4. From the Excel main menu choose Tools/Macros/Visual Basic Editor or click on the
Visual Basic Editor button located on the Visual Basic toolbar. MS Excel 2007-2013
users may select the Developer tab and click on the Visual Basic icon button. (note: if
the Developer tab is not showing in the Ribbon, click on the Office Button on the top
left corner of Excel, select Excel Options, and check Display the Developer Tab in the
Ribbon checkbox.) This brings up the Visual Basic Editor interface which looks like
the picture bellow:

5. From the VB Editor main menu select Tools / References, which brings up the
following dialog:
6. Scroll down in the list until you find the SuperPro Designer reference library (This is
the Designer Type Library exposed by the Pro-Designer OLE Server). Check the library
to be included in your references. The location of the library is shown in the lower part
of the window as shown in the following dialog. You may click on browse to find the
library (Designer.tlb) in case the location shown below is not pointing to the exact
path were SuperPro Designer is installed.:
Make that the location of the library corresponds to the latest version of the
software installed. If this is not the case you should close MS Excel or any
other MS Office application, run the latest version of Pro-Designer software
first, and then open MS Excel to select and include the correct Designer Type
Library. When running the latest version of Pro-Designer, WIndows registry
will get updated with the correct location of the library. It is highly
recommended to first uninstall any older versions of Pro-Designer that may
exist on your system.

7. By now the Designer library should be included in your project. You can view the
libraries in the project by displaying the VBA Object Browser (press F2 or click on the

icon on the standard toolbar, or select View / Object Browser from the VBE main
menu).

8. You can now save your Excel wotksheet.Next time you open the file, you do not have
to repeat these steps. Just verify that the Designer library is added to your Excel
references by checking the object browser.
The Designer Library

General Info

The library exposed by Pro-Designer COM server is the Designer Type Library. The file that
captures the definitions for this library is called Designer.tlb and it is located in the
installation folder of your application. As mentioned in the introduction we use the term
Pro-Designer Server or Designer Server to represent either the SuperPro-
Designer server or the EnviroPro-Designer automation server. The Designer Type Library is
common to both servers and it can be utilized to perform several actions including:

Start / Shut down the Pro-Designer application

Open / close a designer case file

Solve the simulation (perform material and Energy balances)

Perform economic calculations

Data exchange (input / output variable values)

Set report options and export reports to specified files

Export pictures and charts to specified files or to the clipboard

Enumerate over several items lists included in process file (unit procedures, equipment,
streams, components, etc.)

Error message retrieval

The Designer Type Library contains the following members:

The class Application which includes methods (functions and subroutines) that can be
used for communicating between the main Pro-Designer application and other
applications. information on using these methods can be found in Pro-Designer COM
server Methods

The class Document which includes methods (functions and subroutines) that can be
used for communicating information between a Pro-Designer case file and other
applications. Information on using these methods can be found in Pro-Designer COM
server Methods.

The enum varID whose members are predefined constants, used as arguments in the
methods of the Document class in order to access a Pro-Designer variable. Information
on accessing the Pro-Designer variables using these constants can be found in Accessing
Pro-Designer Variables with COM.
Then enum ExportDestination which is used as an argument in the functions used to
export objects as described in Specifying Export Destination. It is part of the argument
list of some Object Export Related Methods.

The enum ExportFormat which is used as an argument in the


SetReportsFormat function as described in Specifying Export Format. It is part of the
argument list of some Object Export Related Methods.

The enum ExportObjectType which is used as an argument in the


ExportObject function as described in Specifying Export Object Type and used in the
Object Export Related Methods.

The enum IngredientConsumptionType which is used in export functions that refer to


ingredient charts (see Object Export Related Methods).

The enums ListTypeID and ContainerTypeID used by the enummerator functions


(Enumerator Description) in order to specify the type of items included in the list , see
Specifying Item List Type, that are to be enumerated and to specify the container object
for the list , see Specifying Container Type.

The enum COMPQUnits which is used for specifying the units in the exported Stream
Summary, Equipment Contents and Procedure Activity Overview tables Specifying
Physical Quantity Units in Tables.

The enums StreamInitMode and SolveAutoInitMode which are used to specify Auto
Initialization options of Streams and Equipment. Please, see Auto Initialization
Variables.

The object browser in Visual Basic Editor (VB Editor) can be used to view the classes of
the Pro-Designer library and their member methods and properties as explained in Viewing
Pro-Designer Methods and Properties.

Viewing Pro-Designer Methods and Properties

The object browser in Visual Basic Editor (VB editor) can be used to view the objects of
the Designer Type Library and their member methods (and properties). From the VB Editor

press F2 (or click on the icon from the standard toolbar, or select View/Object
Browser from the VBE main menu) to display the object browser. From the drop down list
box on the upper-left corner select the Designer library. this will display the classes,
methods and enums belonging the Designer Type Library in the left pane (Document,
EexportDestination, ExportFormat, ExportObjectType, IngredientConsumptionType,
VarID and globals). The right pane displays the members of the selected class/enum. For
example if you select the Document object (left-click) its members are displayed in the
right pane as shown in the following figure.
The bottom pane displays details for the selected item, in this case the class Document. You
can see on the right pane the members of Document. If you select one of them, for example
left click on GetFlowsheetVarVal, and information regarding the specific member is displayed in the
bottom pane, as can be seen in the following figure.
In this case we can see that the function GetFlowsheetVarVal returns a Boolean value and that it takes
2 arguments, the first argument (VarID) is of VarID type and the second argument (val) is of
VARIANT type.

The bottom pane displays all information necessary for a Function /


Subroutine. It specifies the type of value it returns (if is a function) for
example Boolean/Double, Object, etc. Furthermore it shows the number and
type of arguments needed for this method. When an argument is
Variant type,i.e va; in the example, no type is specified. However this
argument needs to be defined as a Variant in your VBA script.
Similarly if you select any of the Enums for example the VarID enum from the left pane,
the variable ids, its constant members are displayed on the right pane as shown in the next
figure.

The members of the Enums (ExportDestination, ExprortFormat, ExportObjectType, IngredientConsumptionType, and VarID) are
predefined constants used as arguments in the Designer library methods. The members of
VarID are used as variable identifiers in order to access or specify a Pro-Designer variable.

Their value is insignificant, however in order to use the Pro-Designer OLE Automation
Server you need to know the correspondence between the Pro-Designer variables and their
identifiers.

This manual provides this information in sections:

See Pro-Designer COM server Methods for information on the Pro-Designer COM
Server methods that can be utilized.

See Accessing Pro-Designer Variables with COM for information on the Pro-Designer
variables than can be accesses with the COM Methods.

The object browser can be a valuable tool to be used as a quick reference when using the
VB Editor since the method and the argument names are self-explanatory. For additional
information on the action and the arguments of each method you can refer to this manual.
Declaring and Initializing Pro-Designer Server Objects

There are two main Pro-Designer server objects that must be created first to automate
SuperPro or EnviroPro Designer. The first one is the Application object, which is
responsible for the top level tasks of the Pro-Designer application, as well as getting a
reference to the second main object which is the Document object. You always have to first
get a reference to the Application object followed by a reference to a Document object in
order to manipulate the process file.

You may see the objects and their methods provided by Pro-Designer by selecting View /
Object Browser from the Visual Basic Editor main menu.

The following code can demonstrate the steps that are taken to declare and initialize these
two server objects:

Dim superProApp As Designer.Application


Dim superProDoc As Designer.Document

Sub StartApp( )
Set superProApp = New Designer.Application
superProApp.ShowApp
End Sub

Sub OpenDoc( )
Set superProDoc = superProApp.OpenDoc(spdFileName)
End Sub

In the above scripts both superProApp and SuperProDoc are declared globally, usually
done at the class or module level of the VBA project, so they can be available to all of the
procedures of the VBA project (sheets, modules, classes, ThisWorkbook). The
initializations of the Application and Document objects are done in the two subroutines
StartApp( ) and OpenApp( ) respectively, which can be defined anywhere in the VBA
project but are usually placed in the ThisWorkbook project object.

For information on the methods of the two objects, see Pro-Designer COM server
Methods.

For more detailed VBA examples that demonstrate the initialization of the two objects
and the use of their methods, see Application Related Scripts.

Pro-Designer COM server Methods


The Designer library COM methods (functions and subroutines that are members of the
Application and Document class) can be conceptually grouped in the following categories:
Application Related Methods

Document Related Methods

Simulation Related Methods

Variable Data Exchange Methods

Auto Initialization Methods

Export Methods

Error Related Methods

Enumerators

Application Related Methods

These methods are used for performing general application tasks such as activating the
designer, application, opening and closing files, etc.

Application Related Methods:

ShowApp( ) This subroutine is used to activate the Pro-Designer application and display
it in its current size position.

CloseApp( ) This subroutine is used to close the Pro-Designer application. If there are
Pro-Designer case files still open it will close all the documents without saving them.

OpenDoc(fileName As String) This function is used to open the Pro-Designer file with
name fileName, makes this file the active Document object, and returns a reference to
the caller.

SetActiveDoc(fileName As String) This function is used to activate the Pro-Designer


file with name fileName and also returns a reference to this file as a Document object.

CloseAllDocs(bSaveIfNeeded As Boolean) This subroutine is used to close all open


Pro-Designer file (Document objects) Use bSaveIfNeeded = True for saving the
Designer case files and bSaveIfNeeded = False for just closing the documents.

a) For help on how to initiate the Application and Document objects, in order to access the
above methods, please see Declaring and Initializing Pro-Designer Server Objects.

b) For VBA examples that use these methods see Application Related Scripts.
Document Related Methods

These methods are used for performing generic document tasks on specific Pro-Designer
case files.

Document Related Methods:

CloseDoc(bSaveIfNeeded As Boolean) This subroutine is used to close the active Pro-


Designer file (Document object). Use bSaveIfNeeded = True for saving the Designer
case file and bSaveIfNeeded = False for just closing the document.

GetDocName(fileName As String, nMaxChar As Long) This function is used to return


the name of the active Pro-Designer file (Document object). The function returns a
Boolean which is True if it was successful in obtaining the file name and False if it was
not. The filename argument is an output argument and returns the name of the Pro-
Designer file. The nMaxChar is an input argument and specifies the number of
characters that the file name will contain

SaveDoc() This subroutine is used to save the the active Document object.

a) For help on how to initiate the Application and Document objects, in order to access the
above methods, please see Declaring and Initializing Pro-Designer Server Objects.

b) For VBA examples that use these methods, see Application Related Scripts.

Simulation Related Methods

These methods are used for simulation tasks. 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:

DoMEBalances(val) This function is equivalent to clicking on the Solve button or to


selecting Tasks / Do M&E Balances from the Pro-Designer application main menu. The
value of variable (val) is currently of no importance.

DoEconomicCalculations( ) This function is equivalent to selecting Tasks / Perform


Economic Calculations from the Pro-Designer application main menu.

ScaleUpThroughput(VarID As VarID, val) This function is used for scaling the process
throughput (It is equivalent to selecting Tasks / Adjust Process Throughput from the
Pro-Designer application main menu and selecting the Based on Scale Up / Down
Factor option). Use VarID = scaleUpFactor_VID and the value of the scale up factor for
val (val is a Variant, its type should be double and its value should be greater than
zero).

Before the Do M&E Balances or the Economic Calculations are executed,


the program checks whether all data entered using the COM functions is
consistent. If there were inconsistencies in the data entered then the Do M&E
Balances and/or Economic Calculations are not performed and the functions
return False. The functions might also return False if there was another error
during solve or economic calculations. (You can check for data inconsistencies
using IsCOMSimDataComplete() as described in Error Related Methods.

For VBA examples that implement these methods, see Simulation Related Scripts.

Variable Data Exchange Methods

These methods are used for data exchange between a Pro-Designer processs file and
external applications. They can be used to set/change input variables in a processs file, or
simply to get the value of an input/output variable.

Please note that the COM functions used for variable data exchange were designed to
mimic the Pro-Designer application interface dialogs, therefore experience with the
SuprePro interface is important for using the COM functions. For example in many dialogs
you have a choice for setting one variable or another, and the respective variables are
enabled only if you select the corresponding option. The same applies in the COM
functions. If you are setting an operation/equipment/ stream etc. variable through a COM
function, make sure you have selected the option for this variable first. If for example you
can set either the mass flow or the volume flow, before calling the COM function on setting
the volume flow, make sure that the option for setting the volume flow is selected (you can
check/set this with the COM function as well). In many cases when setting a value the
corresponding option is also set/enabled.

All variable data exchange methods are Boolean type functions. All functions return True if
the data access was successful and return False if an error occurred during data transfer. In
order to find out how to retrieve error messages in the latter case look at Error Related
Methods. The typical COM function for accessing an input/output variable has 2
arguments, the first one being of VarID type (the variable identifier that specifies the
variable) and the other one being of Variant type (the actual value of the variable). Some
functions require extra arguments in order to specify the variable being accessed. The
variable data exchange methods are grouped in the following categories:

Functions for Process (Flowsheet) Variables

Functions for Section Variables

Functions for Procedure Variables


Functions for Equipment Variables

Functions for Operation Variables

Functions for Stream Variables

Functions for Ingredient Variables

Functions for Heat Transfer Agent Variables

Functions for Power Variables

Functions for Report Option Variables

Functions for Excel Data Link Variables

Functions for Excel Table Variables

One difference with the Pro-Designer application interface is that in the Designer library
methods all variables (with some exceptions) are communicated in SI Units. To find more
on the units of the COM Server Variables, see Units of Variables accessed by COM.

Variable Data Exchange Methods

These methods are used for data exchange between a Pro-Designer processs file and
external applications. They can be used to set/change input variables in a processs file, or
simply to get the value of an input/output variable.

Please note that the COM functions used for variable data exchange were designed to
mimic the Pro-Designer application interface dialogs, therefore experience with the
SuprePro interface is important for using the COM functions. For example in many dialogs
you have a choice for setting one variable or another, and the respective variables are
enabled only if you select the corresponding option. The same applies in the COM
functions. If you are setting an operation/equipment/ stream etc. variable through a COM
function, make sure you have selected the option for this variable first. If for example you
can set either the mass flow or the volume flow, before calling the COM function on setting
the volume flow, make sure that the option for setting the volume flow is selected (you can
check/set this with the COM function as well). In many cases when setting a value the
corresponding option is also set/enabled.

All variable data exchange methods are Boolean type functions. All functions return True if
the data access was successful and return False if an error occurred during data transfer. In
order to find out how to retrieve error messages in the latter case look at Error Related
Methods. The typical COM function for accessing an input/output variable has 2
arguments, the first one being of VarID type (the variable identifier that specifies the
variable) and the other one being of Variant type (the actual value of the variable). Some
functions require extra arguments in order to specify the variable being accessed. The
variable data exchange methods are grouped in the following categories:

Functions for Process (Flowsheet) Variables

Functions for Section Variables

Functions for Procedure Variables

Functions for Equipment Variables

Functions for Operation Variables

Functions for Stream Variables

Functions for Ingredient Variables

Functions for Heat Transfer Agent Variables

Functions for Power Variables

Functions for Report Option Variables

Functions for Excel Data Link Variables

Functions for Excel Table Variables

One difference with the Pro-Designer application interface is that in the Designer library
methods all variables (with some exceptions) are communicated in SI Units. To find more
on the units of the COM Server Variables, see Units of Variables accessed by COM.

Error Related Methods

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

GetCOMErrorMsg(val) 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.
For VBA examples that apply these methods, see Error Handling Scripts.

Error Related Methods

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

GetCOMErrorMsg(val) 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.

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

Enumerators

The ProDesigner COM server includes methods which can facilitate in retrieving lists of
various items that are part of a ProDesigner processs file file. Such item lists may be:

The list of unit procedures included in a flowsheet

The list of equipment involved in a flowsheet

The list of pure components or stock mixtures

The list of streams coming in or leaving a unit procedure

The sections of a flowsheet

The equipment employed in a particular section of the flowsheet,

etc.

For more information on enumerators see:

Enumerator Description

Specifying Enumerator Type IDs

Scripts For Enumerators


Enumerating Example

Accessing Pro-Designer Variables with COM

About

The following tables display variable related information, for accessing (either as input or
output) the Pro-Designer variables using the COM methods of the Designer server. Mainly
the correspondence between the varID Enum and the Pro-Designer variable is given. You
can retrieve the value of all variables using the Get. functions but you can set the value
(using the Set functions) only for those marked as I/O in the table. The tables list the
Variable ID that needs to be used for each variable (val) and their type. Some variables
require extra specification, which is provided through the extra arguments (val2, val3, val4)
when that is necessary.

The variables used in the Pro-Designer Server are grouped in the following categories:

Flowsheet Variables

Report Options Variables

Section Variables

Equipment Variables

Procedure Variables

Operation Variables

Stream Variables

Ingredient Variables

Heat Transfer Agent Variables

Power Type Variables

Excel Tables Options/Data Link Variables

Auto Initialization Variables

All val, val2, val3 arguments of the COM functions are defined as Variants in
the Pro-Designer Server and they must be defined as susch in VBA scripts.
This means they can take different data types (Long, Boolean, Double, String,
etc.). Each Pro-Designer server variable corresponds to a specific type and the
data type for each variable ID is given for each variable category listed below.
Please, see How to Use Variant Data Types in VBA Scripts for useful tips on
how to treat these arguments in your VBA Scripts.

All variables of the Designer type library are communicated in SI Units. To find more on
the units of the COM Variables, see Units of Variables accessed by COM.

Units of Variables accessed by COM

The data exchange in the Pro-Designer COM functions is done in SI units. The following
table lists the most common units used in these functions:

Variable Units
Mass kg
Time s
Volume m3
Mass Flow kg / s
Volumetric Flow m3 / s
Temperature Kelvin
Pressure Pa
Power W
Specific Power W / kg or W / m3 or W /
m2 (depending on the
operation)
Mass Flux kg / m2 s
Volume Flux m3 / m2 s
Mass Concentration kg / m3
Currency $
Fraction / Percentage [0, 1]
Heat Capacity J/kg-K

: Some variables are reported on a per batch basis if the flowsheet is in


Note on Stream related variables

batch mode as shown in the following table:

Variable Units Flowsheet Type


Mass Flow kg / batch Batch
kg / s Continuous
Volumetric Flow m3 / batch Batch
m3 / s Continuous
Molar Flow mol / batch Batch
mol / s Continuous
: The value of most flowsheet related variables are reported on a per year
Note on Flowsheet related variables

basis as shown in the following table. Furthermore some quantity specific variables are
reported on per entity basis if the main product is discrete.

Variable Units Explanation


Annual Amount of kg (/yr) When product is bulk
Product
entity (/yr) When product is discrete
Units Production Cost $ / kg When product is bulk
$ /entity When product is discrete
Total Amount of kg (/yr) When component refers to
Component In/Out bulk material
entity (/yr) When component refers to
discrete entities
Annual Amount of KWh (/yr)
Electricity
Annual Amount of kg (/yr)
Utility (Agent)
Flowsheet Variables

1. Variables used in functions: GetFlowsheetVarVal / SetFlowsheetVarVal

Variable Variable (val) Variable ID (varID) I/O Data

Category Type
Scheduling Recipe Batch batchTime_VID O Double
Time
Recipe Cycle cycleTime_VID O Double
Time
Minimum Recipe minCycleTime_VID O Double
Cycle Time
Maximum maxNumberOfBatchesPerYear_VID O Long
Number Of
Batches Per Year
Number of numberOfBatchesPerYear_VID I/O Long
Batches per Year
Annual annualThroughput_VID I/O Double
Throughput
Batch batchThroughput_VID I/O Double
Throughput
Ref. Flow Stream refFlowStream_VID I/O String
Name
Ref. Flow refFlowComponent_VID I/O String
Component
Name
Throughput Ref. throughputRefFlowDscr_VID O String
Flow Description
Available Annual AOTAvailable_VID I/O Double
Operating Time
Annual Operating AOTUtilized_VID I/O Double
Time
Number of numberOfCampaigns_VID I/O Long
Campaigns
Is the Number of is NumberOfBatchesSBU_VID I/O Boolean
Batches Set By
User
Is Cycle TIme isCycleTimeSBU_VID I/O Boolean
Set-by-User
Longest longestUPName_VID O String
Procedure
Bottleneck bottleneckEquipName_VID O String
Equipment
Is Batch Mode isBatchMode_VID O Boolean
Cost Equipment purchaseCost_VID O Double
Purchase Cost
Unlisted unlistedEquipPurchaseCost_VID O Double
Equipment
Purchase Cost
Direct Fixed Cost DFC_VID O Double
Raw Material materialsCost_VID O Double
Cost
Total Installation installationCost_VID O Double
Cost
Working Capital workingCapital_VID O Double
Startup Capital startupCapital_VID O Double
Up-front R&D upFrontRD_VID O Double
Expenses
Up-front upFrontRoyalties_VID O Double
Royalties
Equipment Cost equipmentCost_VID O Double
Labor Cost laborCost_VID O Double
Consumables consumablesCost_VID O Double
Cost
Laboratory labQcQaCost_VID O Double
Quality Control
and Assurance
Cost
Waste Treatment wasteTrtDspCost_VID O Double
/ Disposal Cost
Utilities Cost utilitiesCost_VID O Double
Transportation transportationCost_VID O Double
Cost
Miscellaneous miscellaneousCost_VID O Double
Cost
Annual Operating annualOperCost_VID O Double
Cost
Annual Operating annualOperCostNDP_VID O Double
Cost (without
depreciation)
Other Annual otherAnnualCost_VID O Double
Operating Cost
Extended Annual extendedAnnualOperCost_VID O Double
Operating Cost
Depreciation Cost depreciationCost_VID O Double
Annual Variable annualVariableOperCost_VID O Double
Operating Cost
Annual Fixed annualFixedOperCost_VID O Double
Operating Cost
Annual annualElectricityCost_VID O Double
Electricity Cost
Product Units unitProductionCost_VID O Double
Cost
Product Units unitProductionCostNDP_VID O Double
Cost (without
depreciation)
Product Units unitProductionCostDscr_VID O String
Cost Units
(Description)
Is the whole isMainRevenueWholeStream_VID O Boolean
stream the main
revenue
Net annual netAnnualOperCost_VID O Double
operating Cost
Economic Revenue revenue_VID O Double
Indices
Net Cash Flow netCashFlow_VID O Double
Gross Margin grossMargin_VID O Double
ROI ROI_VID O Double
IRR Before IRR_BeforeTaxes_VID O Double
Taxes
IRR After Taxes IRR_AfterTaxes_VID O Double
Main Rvenue mainRevenueCost_VID O Double
Cost
Gross Profit grossProfit_VID O Double
Net Profit netProfit_VID O Double
Payback Time paybackTime_VID O Double
Total Investment totalInvestment_VID O Double
Total Investment projectTotalInvestment_VID O Double
charged to this
project
Annual Amount annualElectricityAmount_VID O Double
of Electricity
Low Interest Rate NPVInterestLow_VID O Double
for NPV
Medium Interest NPVInterestMedium_VID O Double
Rate for NPV
High Interest NPVInterestHigh_VID O Double
Rate for NPV
NPV at Low NPVLow_VID O Double
Interest Rate
NPV at Medium NPVMedium_VID O Double
Interest Rate
NPV at High NPVHigh_VID O Double
Interest Rate
Year of Analysis yearOfAnalysis_VIDq I/O Long
Year yearConstructionStarts_VIDq I/O Long
Construction
Starts
Construction constructionPeriod_VID I/O Long
Period
Startup Period startupPeriod_VID I/O Long
Project Lifetime projectLifetime_VID I/O Long
Inflation Rate (0- inflation_VID I/O Double
1)
Depreciation deprecMethod_VID I/O Long
Method
Depreciation deprecPeriod_VID I/O Long
Period
Salvage Fraction salvageF_VID I/O Double
(0-1)
Is Depreciation isDeprecSubFromNetProfit_VID I/O Boolean
Subtracted from
Net Profit
Product Failure prodFailureRate_VID I/O Double
Rate
Failed Product failedProdDisposalCost_VID I/O Double
Disposal Cost
Income Tax Rate incomeTaxRate_VID I/O Double
Sales & adSalesExpFixed_VID I/O Double
Advertising Cost
(Fixed
Component)
Sales & adSalesExpVariable_VID I/O Double
Advertising Cost
(Variable
Component)
General Number of numberOfComps_VID O Long
Components
Registered
Year of Analysis yearOFAnalysis_VID I/O Long
Draftsmans draftsman_VID I/O String
Name
Designers Name designer_VID I/O String
Supervisors superviso_VID I/O String
Name
Companys Name companyName_VID I/O String
Plants Name plantName_VID I/O String
Revision revision_VID I/O String
Approval Date approvalDate_VID I/O Date
Comments comments_VID I/O String
File name fileName_VID O String
including path
Initialize auto bInitIStreamsUponOpen_VID I/O Boolean
intialized streams
upon opening

2. Variables used in functions: GetFlowsheetVarVal2 / SetFlowsheetVarVal2

Variable (val) Variable ID (varID) Variable Extra arg. I/O

Type (val2) and

type
Total amount of totalComponentInput_VID Double Component O
component input to Name
the process (String)
Total amount of totalComponentOutput_VID Double Component O
component output Name
of the process (String)
Labor Cost Rate laborCostRate_VID Double Labor Name I/O
(String)
Adjusted Basic adjBasicCostRate_VID Double Labor Name O
Labor Cost Rate (String)
Annual Amount of annualAgentAmount_VID Double Agent O
Heat Transfer Name
Agent use (String)
Annual Cost of hxAgentCost_VID Double Agent
Heat Transfer Name O
Agent use (String)
Annual Amount of annualElectricityAmount_VID Double Power O
Electricity Name

(String)
Annual Electricity annualElectricityCost_VID double Power O
Cost Name

(String)
Annual Amount of laborAmount_VID Double Labor Type O
Labor hours used Name
(String)
Annual Cost of laborCost_VID Double Labor Type O
Labor use Name
(String)

3. Variables used in Functions: GetFlowsheetVarVal3 / SetFlowsheetVarVal3

Variable Variable ID (varID) Variable Extra arg. Extra arg. I/O


(val)
Type (val2) and (val3) and

type type
Consumable description_VID String Consumable Consumable I/O

Description Name Type


(String) (String)
Consumable consumableUnitCost_VID Double Consumable Consumable I/O

Unit Cost
Name Type
(String) (String)
Consumable consumableBasis_VID Double Consumable Consumable O
Basis Type
Name (String)
(String)
Electricity secOCElecUnitCost_VID Double Section Branch O
Unit Cost Name Name
(String ) (String)

Note: Electricity Unit Cost can only be retreived, if there is only one type of Power utilized
in the section (default power), otherwise, if there are different types you must use
GetPowerVarVal function indicating the power type, see Functions for Power Variables.

Report Options Variables

Variables for functions: GetReportGeneralOptions / SetReportGeneralOptions

Variable (val) Variable ID (varID) I/O Data Type


Use Default Title in bDefaultTitle_VID I/O Boolean
Reports
Title title_VID I/O String
Header header_VID I/O String
Footer footer_VID I/O String
Section Variables

1. Variables used in functions: GetSectionVarVal / SetSectionVarVal

Variable Variable (val) Variable ID (varID) I/O Data


Type
Category
Cost Equipment purchaseCost_VID O Double
Purhcase Cost
Direct Fixed Cost DFC_VID O Double
Raw Materials materialsCost_VID O Double
Cost
Installation Cost installationCost_VID O Double
Direct Cost directCost_VID O Double
Indirect Cost indirectCost_VID O Double
Other Cost otherCost_VID
Equipment Cost equipmentCost_VID O Double
Labor Cost laborCost_VID O Double
Consumable Cost consumablesCost_VID O Double
Laboratory labQcQaCost_VID O Double
Quality Control
and Assurance
Cost
Waste Treatment wasteTrtDspCost_VID O Double
/ Disposal Cost
Utilities Cost utilitiesCost_VID O Double
Transportation transportationCost_VID O Double
Cost
Miscellaneous miscellaneousCost_VID O Double
Cost
Annual Operating annualOperCost_VID O Double
Cost
Depreciation depreciationCost_VID O Double
Cost
Annual annualElectricityCost_VID O Double
Electricity Cost
Capital DFC Estimation secCCDFCEstimationOption_VID I/O Long
Option
Cost/DFC
0 = Set By User

1 = Using PC-to-
DFC Factor

2 = Detailed
Estimation
PC-to-DFC secCCPCtoDFCFactor_VID I/O Double
Factor
Piping Factor secCCPipingF_VID I/O Double
Instrumentation secCCInstrumentationF_VID I/O Double
Factor
Insulation Factor secCCInsulationF_VID I/O Double
Electrical secCCElecFacilitiesF_VID I/O Double
Facilities Factor
Buildings Factor secCCBuildingsF_VID I/O Double
Yard secCCYardImprovementF_VID I/O Double
Improvement
Engineering secCCEngineeringF_VID I/O Double
Factor
Auxiliary secCCAuxFacilitiesF_VID I/O Double
Facilities Factor
Yard secCCYardImprovementF_VID I/O Double
Improvement
Factor
Construction secCCConstructionF_VID I/O Double
Factor
Contractors Fee secCCContractorFeeF_VID I/O Double
Factor
Contigency secCCContigencyF_VID I/O Double
Factor
Unlisted secCCUnlistedEquipF_VID I/O Double
Equipment Factor
Unlisted secCCUnlistedEquipInstallF_VID I/O Double
Equipment
Installation
Factor
Capital Is Working secCCWkngCapSetByUSer_VID I/O Boolean
Capital
Cost/Misc
Set By User
Working Capital secCCWkngCap_VID I/O Double
Days of Labor secCCWkngCapLanorDays_VID I/O Double
Incl. Cost In
Working Capital
Days of Raw secCCWkngCapRawMatDays_VID I/O Double
Materials
CostIncl. In
Working Capital
Days of Utilities secCCWkngCapUtilities_VID I/O Double
Cost Incl. In
Working Capital
Days of Waste secCCWkngCapWasteTrmtDays_VID I/O Double
Treatment incl. In
Working Capital
Working Capital secCCWkngCapMisc_VID I/O Double
for Miscellaneous
Activities
Is Startup Cost secCCStartupCostSetByUser_VID IO Boolean
Set By User
Startup Cost secCCStratupCostF_VID I/O Double
Factor
Up Front R&D secCCUpFrontRD_VID I/O Double
Factor
Up Front secCCUpFrontRoyalties_VID I/O Double
Royalties Factor
User Comments comments_VID I/O String
Oper. Cost Inc. Component secOCInclOpParamsBased_VID I/O Boolean
Based on
/ Facility Operating
Parameters
Incl. Component secOCInclCapInvstmBased_VID I/O Boolean
Based on Capital
investment
Incl. Component secOCInclEquipUseBased_VID I/O Boolean
Based on Equip.
Usage/Avail.
Inc. Component secOCInclFacilityUseBased_VID I/O Boolean
Based on Facility
Usage/Avail.
Is Equipment secOCEquipHrsBasedOnUsage_VID I/O Boolean
Charge (Hours)
Based on Use?
Facility Charge secOCFacilityUseRate_VID I/O Double
Rate
Is Maintenance secOCInclMaintnc_VID I/O Boolean
Component
Included?
Is Depreciation secOCInclDeprec_VID I/O Boolean
Component
Included?
Is Miscellaneous secOCInclMiscCosts_VID I/O Boolean
Cost Component
Included?
Is Miscellaneous secOCMaintcBasedOnDFC_VID I/O Boolean
Cost Calculated
from DFC?
DFc to secOCDFCtoMaintcF_VID I/O Double
Maintenance
Factor
Insurance Factor secOCInsuranceF_VID I/O Double
Local Taxes secOCLocalTaxF_VID I/O Double
Factor
Factory Expenses secOCFactoryExpF_VID I/O Double
Factor
Oper. Cost Electricity Unit secOCElecUnitCost_VID O Double
Cost
/ Util.
Extra Electricity secOCExtraElec_VID I/O Double

(per year or per


batch)
Is Extra secOCIsExtraElecPerYear_VID I/O Boolean
Electricity Set On
a Per-Year Basis?
General Load secOCGeneralLoadF_VID I/O Double

(as % total)
Electrical Poqer secOCUnlistedEquipLoadF_VID I/O Boolean
for Unlisted

Equip. (as %
Total)
Oper. Is Misc. Oper. secOCIsOCMiscPerYear_VID I/O Boolean
Cost Items Set on
Cost/Misc. a Per Year Basis?
R&D Cost secOCResAndDevFixed_VID I/O Double
(Fixed)
R&D Cost secOCResAndDevVariable_VID I/O Double
(Variable)
Process secOCProcessValidation_VID I/O Double
Validation
Other Cost secOCMiscOtherFixed_VID I/O Double
(Fixed)
Other Cost secOCMiscOtherVariable_VID I/O Double
(Variable)
General Number of numberOfComps_VID O Long
Components
Registered
Gross Mass Yield grossMassYield_VID O Double
Refined Mass refinedMassYield_VID O Double
Yield
Molar Yield molarYield_VID O Double

2. Variables Used In Functions: GetSectionVarVal2 / SetSectionVarVal2

Variable (val) Varibale ID (varID) Data Extra arg. I/O


Type
(val2) and

type
Annual Material materialAmount_VID Double Material O
Amount Name
(String)
Annual Heat annualAgentAmount_VID Double Agent O
Transfer Agent Name
Amount (String)
Annual Labor laborAmount_VID Double Labor O
Amount Type
Name
(String)
Annual Electricity annualElectricityAmount_VID Double Power O
Amount Type
Name
(String)
Equipment Variables

1. Variables used in functions: GetEquipVarVal / SetEquipVarVal

Variable (val) Variable ID (varID) I/O Data

Type
Number of Units noUnits_VID I/O Long
Number of Procedures noHostedProcedures_VID O Long
hosted by this
equipment
Is Equipment In isDesignMode_VID I/O Boolean
Design Mode?
Number of Staggered noStaggeredEquip_VID I/O Long
Equipment Sets. Will
enable staggering
mode if number of
staggered sets >=1 or
disable it if set to zero.
Purchase Cost equipPC_VID I/O Double
Purchase Cost equipPCEstimationOption_VID I/O Long
Estimation Option

0 = Default Model

1= User Defined
Model

2 = Set by User
Number of Standby equipStandByNoUnits_VID I/O Long
Units
PC Portion Already equipPCDeprePortion_VID I/O Double
Depreciated
Construction Material equipConstrMaterial_VID I/O String
Construction Material equipConstrMaterialF_VID I/O Double
Factor
Installation Factor equipInstallCostF_VID I/O Double
Maintenance Factor equipMaintcCostF_VID I/O Double
Usage Rate equipUsageRate_VID I/O Double
Availability Rate equipAvailabilityRate_VID I/O Double
Busy Time (total time busyTime_VID O Double
equipment is engaged,
possibly by multiple
procedures, not
including in-between
dead-time)
Occupancy Time occupancyTime_VID O Double
(total time equipment
is occupied, including
in-between dead-time)
Equipment Name equipmentName_VID O String
Description description_VID I/O String
User Comments comments_VID I/O String
Equipment Size size_VID O Double
Equipment Size Units sizeUnits_VID O String
Sizing Description sizeName_VID O String
Equipment Type typeName_VID O String
Equipment Type ID typeID_VID O Long

/ GetEquipVarValEx

2. Variables used in functions: GetEquipVarVal3 / SetEquipVarVal3

Variable Variable ID (varID) Var. Extra arg. Extra arg. I/O

Type (val2) and (val3) and

type type
Consumable consumableReplFreq_VID Double Consumable Consumable I/O

Replacement Name Type

Frequency (String) (String)


Consumable consumableReplFreqBasis_VID String Consumable Consumable I/O

Replacement Name Type

Frequency (String) (String)

Basis
Size sizeUtilization_VID Double Procedure - O
Utilization Name
(String)
Time timeUtilization_VID Double Procedure - O
Utilization Name
(String)

3. Equipment Specific Variables for variables used in certain equipment (i.e. volume in
vessels)

4. Variables used in functions: GetEquipContentsVarVal / SetEquipContentsVarVal

Variable (val) Variable ID (varID) I/O Data

Type
Contents Temperature temperature_VID I/O Double
Contents Pressure pressure_VID I/O Double
Activity activity_VID O Double
Mass Flow massFlow_VID I/O Double
Volumetric Flow volFlow_VID I/O Double
Ingredient Mass Flow componentMassFlow_VID I/O Double
Ingredient Mole Flow componentMoleFlow_VID I/O Double
Ingredient Mass compMassConc_VID O Double
Concentration
Ingredient Mole compMoleConc_VID O Double
Concentration
Ingredient Mass Fraction compMassFrac_VID I/O Double
Ingredient Mole Fraction compMoleFrac_VID O Double
Ingredient Vapor Fraction compVaporFrac_VID O Double
Ingredient Extra Cell compExtraCellFrac_VID I/O Double
Fraction
Ingredient Molecular mw_VID O Double
Weight
Edit the ingredient bEditIngredientFracs_VID I/O Boolean
fractions as opposed to
the flows
Edit the contents mass as bVolFlowSetByUser_VID I/O Boolean
opposed to the volume

Plus the following environmental properties:

Variable ID (varID) I/O Data

Type
TOC_VID O Double
COD_VID O Double
ThOD_VID O Double
BODu_VID O Double
BOD5_VID O Double
TKN_VID O Double
NH3_VID O Double
NO3_VID O Double
TP_VID O Double
TS_VID O Double
TSS_VID O Double
VSS_VID O Double
DVSS_VID O Double
TDS_VID O Double
VDS_VID O Double
DVDS_VID O Double
CaCO3_VID O Double
Procedure Variables

1. Variables for functions: GetUPVarVal / SetUPVarVal

Variable Variable ID (varID) I/O Data

Type
Number of Operations in numberOfOperations_VID O Long
the Procedure
Number of Cycles in the numberOfCycles_VID I/O Long
Procedure
Start Time startTime_VID O Double
End Time endTime_VID O Double
Cycle Time cycleTime_VID O Double
Holdup Time holdupTime_VID I/O Double
Total Time per Batch (all totalTimePerBatch_VID O Double
cycles)
Is Batch Mode? isBatchMode_VID O Boolean
Equipment Name equipmentName_VID O String
Size Utilization sizeUitlization_VID O Double
Time Utilization timeUtilization_VID O Double
Comments comments_VID I/O String

2. Variables for functions: GetUPVarVal2 / SetUPVarVal2


Variable Variable ID (varID) Data Extra arg. I/O

Type (val2) and

type
Annual Material materialAmount_VID Double Material O
Amount Name
(String)
Annaul Heat annualAgentAmount_VID Double Agent O
Transfer Agent Name
Amount (String)
Annual Labor laborAmount_VID Double Labor O
Amount Type
Name
(String)
Annual Electricity annualElectricityAmount_VID Double Power O
Amount Type
Name
(String)

3. Variables for functions: GetUPEmptiedContentsVarVal

Variable Variable ID (varID) I/O Data


Type
Stream Temperature temperature_VID O Double
Stream Pressure pressure_VID O Double
Stream Mass Flow massFLow_VID O Double
Stream Volumetric Flow volFLow_VID O Double
Specified Component Molecular mw_VID O Double
Weight
Specified component mass flow in componentMassFlow_VID O Double
stream
Specified component mass fraction compMassFrac_VID O Double
in stream
Specified component mole flow in componentMoleFlow_VID O Double
stream
Specified component mole fraction componentMoleFrac_VID O Double
in stream
Specified component mass compMassConc_VID O Double
concentration in stream
Specified component mole compMolConc_VID O Double
concentration in stream
Specified component extra cellular compExtraCellFrac_VID O Double
fraction in stream
Specified component vapor fraction compVaporFrac_VID O Double
in stream
Operation Variables

1. Variables for functions: GetOperVarVal / SetOperVarVal

Variable Variable ID (varID) I/O Data

Type
Operation Start Time startTime_VID O Double
Operation End Time endTime_VID O Double
Operation Set Up setUpTime_VID I/O Double
Time
Operation Process processTime_VID I/O Double
Time
Operation Holdup holdupTime_VID I/O Double
Time
Operation Turnaround turnaroundTime_VID I/O Double
Time
Process Time Calculation processTimeCalcMode_VID O Long
Mode
Thermal Mode thermalMode_VID I/O Long
Exit Temperature exitTemperature_VID I/O Double
Heating Duty heatingDuty_VID I/O Double
Cooling Duty coolingDuty_VID I/O Double
Primary Heat Transfer primaryHxAgentName_VID O String
Agent Name
Primary Heat Transfer primaryHxAgentRate_VID O Double
Agent Rate
Primary Heat Transfer primaryHxAgentRate_VID O Double
Agent Duty
Is Primary Heat isPrimaryHxAgentHeating_VID O Boolean
Transfer Agent
Heating or Cooling?
Power Calculation Mode powerCalcMode_VID O Long
Power power_VID I/O Double
Specific Power specPower_VID I/O Double
Power per Unit powerPerUnit_VID I/O Double
Power Dissipation to powerDissipationFrac_VID I/O Double
Heat
Operation Type opType_VID O String
Operation Description opDescr_VID I/O String
Is Operation isOpDescrSetByUser_VID I/O Boolean
Description

Set By User
User Comments comments_VID I/O String

Note: When setting the operation process time the process time calculation mode is forced
to Set by the User.

2. Variables for functions: GetOperVarVal2 / SetOperVarVal2

Variable Variable (varID) Extra arg. I/O Data

(val2) and Type

type
Labor Need laborNeed_VID Labor Name I/O Double

(String)
Labor Units laborUnits_VID Labor Name O String

(String)

3. Operation Specific Variables for variables used in operations equipment.

Process Time Calculation Mode

Process Time Calculation Mode values that can be retrieved with


processTimeCalcMode_VID:

Value (Long) Meaning


1 Process Time is Set by the User
2 Process Time is Calculated from another parameter
such as flowrate, volume, throughput, flux, etc
dpending on the operation
3 Process Time is set by a Master-Slave Relationship (it
depends on another operation in the same procedure or
another operation in another porcedure)
4 Process Time is calculated based on the Mass flowrate
(when rerrieving data from operation such as Charge,
Transfer In/Out, Pull In/Out, etc)
5 Process Time is calculated based on the Volumetric
flowrate (when retrieving data from operations such as
Charge, Transfer In/Out, Pull In/Out, etc)
9 Process Time is set by a sequence of other operations

Power Calculation Mode

Power Calculation Mode Values that can be retrieved with powerCalcMode_VID:

Value (Long) Meaning


1 Power is Set by the User
2 Power is set from the Specific Power
3 Power is set by the Simulation Output
4 None of the above

Thermal Mode

Thermal Calculation Mode Values that can be set or retrieved with thermalMode_VID:

Value (Long) Meaning


1 Set Final Temperature or Isothermal Mode
2 Adiabatic Mode
3 Set Duty Mode (Set the Heating or Cooling Duty)

Stream Variables

Variables for functions: GetStreamVarVal / SetStreamVarVal

for any Stream


Variable Variable ID (varID) I/O Data
Type
Stream Temperature temperature_VID O Double
Stream Pressure pressure_VID O Double
Stream Price streamPrice_VID I/O Double
User Comments comments_VID I/O String
Stream Activity activity_VID O Double
Stream Mass Flow massFLow_VID O Double
Stream Volumetric Flow volFLow_VID O Double
Specified Compnent Molecular mw_VID O Double
Weight
Specified component mass flow in componentMassFlow_VID O Double
stream
Specified component mass fraction compMassFrac_VID O Double
in stream
Specified component mole flow in componentMoleFlow_VID O Double
stream
Specified component mole fraction componentMoleFrac_VID O Double
in stream
Specified component extra cellular compExtraCellFrac_VID O Double
fraction in stream

Specified component vapor fraction compVaporFrac_VID O Double


in stream
Enthalpy of Stream enthalpy_VID O Double
Specific Enthalpy of Stream specificEnthalpy_VID O Double
Heat Capacity of Stream Cp_VID O Double
Check if a stream is an input stream isInputStream_VID O Boolean
(no source UP)
Check if a stream is an output isOutputStream_VID O Boolean
stream (no destination UP)
Is it a Raw Material? isRawMaterial_VID O Boolean
Is it a Cleaning Agent? isCleaingAgent_VID O Boolean
Is it a Main Revenue:? isMainRevenue_VID I/O Boolean
Is it a Revenue? isRevenue_VID I/O Boolean
Is it a Waste? isWaste_VID O Boolean
Is it a Solid Waste? isSolidWaste_VID O Boolean
Is it an Aqueous Waste? isAqueousWaste_VID O Boolean
Is it an organic Waste? isOrganicWaste_VID O Boolean
Is it an Emission? isEmission_VID O Boolean
Is it classified as none? isNone_VID I/O Boolean
Stream Classification classification_VID O String
Waste Treatment Cost wasteTreatCost_VID I/O Double
(input, intermediate or output):

for Input Streams:

Variable Variable ID (varID) I/O Data


Type
Stream Temperature temperature_VID I/O Double
Stream Pressure pressure_VID I/O Double
Stream Price streamPrice_VID I/O Double
Stream Activity activity_VID O Double
Stream mass flow massFlow_VID I/O Double
Stream volumetric flow volFlow_VID I/O Double
Component Molecular Weight mw_VID O Double
Specified ingredient (pure componentMassFlow_VID I/O Double
component/mixture) mass flow in
stream
Specified ingredient (pure compMassFrac_VID I/O Double
component/mixture) mass fraction
in stream
Specified ingredient (pure componentMoleFlow_VID I/O Double
component/mixture) mole flow in
stream
Specified ingredient (pure componentMoleFrac_VID I/O Double
component/mixture) mole fraction
in stream
Specified ingredient (pure compExtraCellFrac_VID I/O Double
component/mixture) extra cellular
fraction in stream
Specified ingredient (pure compMassConc_VID O Double
component/mixture) mass
concentration in stream
Specified ingredient (pure compMolConc_VID O Double
component/mixture) mole
concentration in stream
Is the stream flow Auto Adjusted? autoAdjust_VID I/O Boolean
Do we edit the ingredient fractions? bEditIngredientFracs_VID I/O Boolean
(as opposed to the flows)
Do we edit the stream mass flow? bVolFlowSetByUser_VID I/O Boolean
(as opposed to the stream
volumetric flow)
Is it a Raw Material? isRawMaterial_VID I/O Boolean
Is it a Cleaing Agent? isRawMaterial_VID I/O Boolean
Is it classified as none? isNone_VID I/O Boolean
for Output Streams:

Variable Variable ID (varID) I/O Data


Type
Is it a Credit? isCredit_VID I/O Boolean
Is it a Solid Waste? isSolidWaste_VID I/O Boolean
Is it an Aqueous Waste? isAqueousWaste_VID I/O Boolean
Is it an Organic Waste? isOrganicWaste_VID I/O Boolean
Is is an Emission? IsEmission_VID I/O Boolean

Ingredient Variables

Variables for functions: GetIngredientVarVal / SetIngredientVarVal

Variable Variable ID (varID) I/O Data


Type
Pruchase Price purchasePrice_VID I/O Double
Selling Price sellingPrice_VID O Double
Waste Treatment Cost wasteTreatCost_VID I/O Double
User Comments comments_VID I/O String
Formal Name componentName_VID O String
Trade Name tradeName_VID I/O String
Formula formula_VID I/O String
CAS Number CAS_Number_VID I/O String
Compny ID companyID_VID I/O String
Molecular Weight mw_VID I/O Double
Enthalpy of Formation enthalpyOfFormation_VID I/O Double
Normal Boilong Point boilingPoint_VID I/O Double
Normal Freezing Point freezingPoint_VID I/O Double
Critical Temperature criticalT_VID I/O Double
Critical Pressure criticalP_VID I/O Double
Compressibility Factor compressilibilityF_VID I/O Double
Acentric Factor (Omega) acentricF_VID I/O Double
Henrys Constant henryC_VID I/O Double
Particle Size particleSize_VID I/O Double
Default Volumetric defVolumetricC_VID I/O Double
Coefficient
Liquid/Solid Density liqSolDensityCoeffA_VID I/O Double
Coefficient A
Liquid/Solid Density liqSolDensityCoeffB_VID I/O Double
Coefficient B
Pure Components:

Stock Mixtures:

Variable Variable ID (varID) I/O Data


Type
Pruchase Price purchasePrice_VID I/O Double
User Comments comments_VID I/O String
Formal Name componentName_VID O String
Trade Name tradeName_VID I/O String
Liquid/Solid Density liqSolDensityCoeffA_VID I/O Double
Coefficient A
Liquid/Solid Density liqSolDensityCoeffB_VID I/O Double
Coefficient B

Ingredient Inventory variables:

Variable Variable ID (varID) I/O Data


Type
Inventory Supply Rate invSupplyRate_VID I/O Double
Inventory Supply Start invSupplyStartTime_VID I/O Double
Time
Inventory Capacity invCapacity_VID I/O Double
Inventory Initial Contents invInitialContents_VID I/O Double
Heat Transfer Agent Variables

Variables for functions: GetHXAgentVarVal / SetHXAgentVarVal

Variable Variable ID (varID) I/O Data


Type
Price hxAgentPrice_VID I/O Double
If True the price is in $/kg isPriceQuantityBased_VID I/O Boolean
else it is in $/kcal
Mass-to-Energy Factor massToEnergyF_VID I/O Double
User Comments comments_VID I/O String
Inventory Supply Rate invSupplyRate_VID I/O Double
Inventory Supply Start invSupplyStartTime_VID I/O Double
Time
Inventory Capacity invCapacity_VID I/O Double
Inventory Initial Contents invInitialContents_VID I/O Double
Power Type Variables

Variables for functions: GetPowerVarVal / SetPowerVarVal


Variable Variable ID (varID) I/O Data
Type
Purchase Price purchasingPrice_VID I/O Double
Selling Price sellingPrice_VID I/O Double
User Comments comments_VID I/O String
Excel Tables Options/Data Link Variables
Data Link Variables

Variables for functions: Set/GetXLSLinkDataForStreamSummaryTable,


Set/GetXLSLinkDataForComponentPropsTable,
Set/GetXLSLinkDataForEquipmentContentsTable,
Set/GetXLSLinkDataForProcedureOperSeqTable

Variable Variable ID (varID) I/O Data


Type
Name of Excel workbook workbook_VID I/O String
for the link
Name of Excel range for rangeName_VID I/O String
the link
Auto-update values? bAutoUpdate_VID I/O Boolean
Expand (range) cell area bExpandExtraCellArea_VID I/O Boolean
to fit data if necessary?
Erase extra (range) cell bEraseExtraCellArea_VID I/O Boolean
area if data array is
smaller than cell area?
Include column headers bIncludeColumnHeaders_VID I/O Boolean
at the top of each
column?
Include row headers at bIncludeRowHeaders_VID I/O Boolean
the beginning of each
row?
Carry over styles of the bIncludeStyles_VID I/O Boolean
tables?
Options Variables

1. Variables for functions: Set/GetOptionsForEquipmentContentsTable(equipName As


String, VarID As VarID, val), Set/GetOptionsForStreamSummaryTable(VarID As VarID,
val)

Variable Variable ID (varID) Data Units Type


Type
Total Mass totalMassUnits_VID Long Mass
Temperature temperatureUnits_VID Long Temperature
Pressure pressureUnits_VID Long Pressure
Liquid/Solid Mass liquidSolidMassUnits_VID Long Mass
Liquid/Solid liquidSolidVolUnits_VID Long Volume
Volume
Liquid/Solid liquidSolidDensityUnits_VID Long Density
Density
Total Mass totalMassContentsUnits_VID Long Mass/Fraction
Contents
Liquid/Solid Mass liquidSolidMassContentsUnits_VID Long Mass/Fraction
Contents
Vapor Mass gasMassContentUnits_VID Long Mass/Fraction
Contents
Liquid/Solid Heat liquidSolidCpUnits_VID Long Heat Capacity
Capacity

2. Variables for functions: Set/GetOptionsForProcOperationSequenceTable(procName


As String, VarID As VarID, val)

Variable Variable ID (varID) Data Units Type


Type
Total Charge Mass chargeMassUnits_VID Long Mass
Charge chargeLiquidSolidMassUnits_VID Long Mass
Liquid/Solid Mass
Charge chargeLiquidSolidDensityUnits_VID Long Density
Liquid/Solid
Density
Charge chargeLiquidSolidVolUnits_VID Long Volume
Liquid/Solid
Volume
Charge chargeTemperatureUnits_VID Long Temperature
Temperature
Charge Pressure chargePressureUnits_VID Long Pressure

Contents Total totalMassUnits_VID Long Mass


Mass
Contents liquidSolidMassUnits_VID Long Mass
Liquid/Solid Mass
Contents liquidSolidVolUnits_VID Long Volume
Liquid/Solid
Volume
Contents liquidSolidDensityUnits_VID Long Density
Liquid/Solid
Density
Contents temperatureUnits_VID Long Temperature
Temperature
Contents Pressure pressureUnits_VID Long Pressure

Duration durationUnits_VID Long Time


Start Time stratTimeUnits_VID Long Time
End Time endTimeUnits Long Time

Note that for the value of the units variable a new Enum is now exported: the
COMPQUnits Enum. For more information look at Specifying Physical Quantity Units in
Tables.

Auto Initialization Variables

Variables that are used with functions:


GetStreamAutoInitOptions / SetStreamAutoInitOptions &
GetEquipContentsAutoInitOptions / SetEquipContentsAutoInitOtpions.

Variable Description Variable ID (varID) Data Type


Initialization Mode autoInitMode_VID Long
Is source the same file? isSourceFileSame_VID Boolean
Is Path Partial bPartialPath_VID Boolean
Source File Name sourceFileName_VID String
Source Stream/Equipment sourceStreamName_VID String
Name
Initialize Total Mass Flow bInitTotalMassFlow_VID Boolean
Total Mass Flow Factor totalFlowFactor_VID Double
Initialize Composition bInitComposition_VID Boolean
Initialize Density / Thermo bInitDensity_VID Boolean
Data
Initialize Temperature bInitTemperature_VID Boolean
Initialize Pressure bInitPressure_VID Boolean
Initialize Discrete Entity Data bInitEntityData_VID Boolean
Before solving M&E balances solveAutoInitMode_VID Long
auto initialization Mode

When using the AutoInitMode_VID the functions can only take as a VARIANT val
aurgument the following options:

Variable Description autoInitMode_VID Enum ID


Initialize by user byUser_SIM 1
Initialize with default contents withDefault_SIM 2
(Equipment only)
Auto initialize from other source fromSource_SIM 3
Initialize from own contents fromSelf_SIM 4

(Equipment only)

and when using solveAutoInitMode_VID they can only take the following options:

Variable Description solveAutoInitMode_VID Enum ID


Never auto-initialize neverInit_SAIM 0
Always auto-initialize alwaysInit_SAIM 1
Ask user to initialize asUser_SAIM 2

Specifying Enumerator Type IDs


Specifying Container Type

This Enum is used for specifying the type of conatiner that holds (or owns) the list of items
that we are enumerating. It is used by the enumeration functions StartEnumeration() and
GetNextItemName().

If the Container Object is... Use as ContainerTypeID...


The Flowsheet flowsheet_CID
A Unit Procedure unitProc_CID
An Equipment equipment_CID
An Operation operation_CID
A Stream stream_CID
A Branch branch_CID
A Section of the Main Branch mainBranchSection_CID
A Stock Mixture stockMix_CID
Specifying Item List Type

This Enum is used for specifying the type of items that we wish to start or contunue
enumerating over. It is used by the Enumerators StartEnumeration() and
GetNextItemName().

For Enumerating... Use as ListTypeID...


Unit Procedures unitProc_LID
Equipment equipment_LID
Staggered Equipment staggeredEquip_LID
Operation operation_LID
Streams stream_LID
Input Streams inStream_LID
Output Streams outStream_LID
Pure Components pureComp_LID
Stock Mixtures stockMix_LID
Branches branch_LID
Sections section_LID
Labors labor_LID
Heat Transfer Agents hxAgent_LID
Power Types power_LID
Consumables consumable_VID
Storage Units storageUnit_VID
Reactions reaction_LID
CIP Cleaning Steps cleanStep_LID
Variable Ids variableId_LID

Setting Pro-Designer Export Specifications

Exporting of objects such as charts, pictures and reports require certain options to be
specified. These are the Export Destination, Export Format, Export Object Type and Export
Ingredient Type.

VBA Sample Scripts


Visual Basic for Applications (VBA) is an application scripting language defined by
Microsoft, that allows automation of processes by VBA-enabled applications. It supports
Visual Basic syntax, OLE automation, and function calls for external DLLs. It is
Microsoft's common application (macro) language for Access, Excel, Word, Project, and
the Visual Basic programming environment. VBA is an important tool for the interaction of
Pro-Designer with other Windows applications such as Excel.

Examples are given for VBA functions/subroutines that can either be called directly from
an Excel cell (or another Windows application) or they can be used in another VBA
function / subroutine. These scripts make use of the Pro-Designer COM
functions/subroutines that are members of the Designer Type Library. These VBA script
examples include:

Application Related Scripts

Simulation Related Scripts

Data Exchange Scripts

Error Handling Scripts

How to Use Variant Data Types in VBA Scripts

A Variant data type variable is the data type for all variables that are not explicitly declared.
You can use the Variant data type in place of any data type to work with data in a more
flexible way. More information can be found in the VBA Documentation of Excel.

In VBA the Variant data type is automatically specified if you don't specify a data type for
a variable. However it is advised to declare it as such for more efficient memory use. You
can use the Dim, Public, or Private statement for this as shown:

Dim var1 As Variant

When variable var1 is set to a value VBA automatically converts the data type to the proper
type, i.e. String, Double, Long, Boolean, etc. However in many cases errors in the way the
data was entered leads to misinterpretation of the data-type, which may result in delirious
results. Therefore it is highly recommended that when you assign values to Pro-Designer
variables you use the correct type.

If you are assigning a value of a variant variable from a VBA script the make sure you get
it from a type variable or you cast it to the right type. This is demonstrated in the following
script, which is a subroutine that can be used for demonstration purposes.

Sub Demonstrate()

Set SuperProDoc = DocumentObject()


Dim var1 As Variant

Dim var2 As Variant

Dim str As String 'declare a string datatype

Dim nVal As Integer 'declare an integer datatype

Dim bVal As Boolean 'declare a Boolean datatype

Dim dblVal As Double 'declare a double datatype

Dim dateVal As Date 'declare a date datatype

nVal = CLng(74)

bVal = True

dblVal = CDbl(5467.77)

dateVal = CDate(#12/31/2007#) (December 31st, 2007)

'Set value of some variables

var1 = dblVal

SuperProDoc.SetFlowsheetVarVal VarID.AOTAvailable_VID, var1

dblVal = CDbl(var1) 'double or float

var1 = nVal

SuperProDoc.SetFlowsheetVarVal VarID.numberOfCampaigns_VID, var1

nVal = CLng(var1) 'integer or long


var1 = bVal

SuperProDoc.SetFlowsheetVarVal VarID.isNumberOfBatchesSBU_VID, var1

bVal = CBool(var1) 'boolean

var1 = dateVal

SuperProDoc.SetFlowsheetVarVal VarID.approvalDate_VID, var1

dateVal = Cdate(var1) 'date

'Retrieve value of variables and display in a message box

SuperProDoc.GetFlowsheetVarVal VarID.AOTAvailable_VID, var1

dblVal = CDbl(var1) 'double or float

MsgBox (dblVal)

SuperProDoc.GetFlowsheetVarVal VarID.numberOfCampaigns_VID, var1

nVal = CLng(var1) 'integer or long

MsgBox (nVal)

SuperProDoc.GetFlowsheetVarVal VarID.isNumberOfBatchesSBU_VID, var1

bVal = CBool(var1) 'boolean

MsgBox (bVal)
SuperProDoc.GetFlowsheetVarVal VarID.longestUPName_VID, var1

str = CStr(var1) 'string

MsgBox (str)

SuperProDoc.GetFlowsheetVarVal VarID.approvalDate_VID, var1

dateVal = CDate(var1) 'date

MsgBox (dateVal)

End Sub

In the script above the following VBA functions were used for casting an expression to a
specific data type and returning a value of that data type:

VBA function Returns a value of type


CDbl (expression) Double
CLng (expression) Long
CBool (expression) Boolean
CStr (expression) String
CDate (expression) Date

If you are setting the value of a variable through an Excel cell you can generally expect that
any string you enter will be taken as a String, any False/True as a Boolean, and any number
as a Double unless otherwise specified. But you can still cast the variant types variables as
shown in the above script . When you pass arguments using VBA functions you can specify
the type of the argument in the function statement. If you dont specify the type of the
argument in the function statement then its type is a Variant. (Look at the second example
of Scripts For Procedure Variables)
Application Related Scripts

Examples of general-purpose application related scripts that use the Pro-Designer


application related COM methods. In order to use the Pro-Designer OLE Automation
Server it is essential to create the server object and open an existing processs file file
(example 1).

Example 1: Creating the Server Object and Opening a Document

Sub OpenSPDFile(spfFile As String)

Dim superProApp As Designer.Application

Set superProApp = CreateObject("SPDFlowsheet")

superProApp.ShowApp

superProApp.OpenDoc (spfFile)

End Sub

or

Sub OpenSPDFile(spfFile As String)

Dim superProApp As Designer.Application

Set superProApp = New Designer.Application

superProApp.ShowApp

superProApp.OpenDoc (spfFile)

End Sub

or
Sub OpenSPDFile(spfFile As String)

Dim superProApp As New Designer.Application

superProApp.ShowApp

superProApp.OpenDoc (spfFile)

End Sub

In this VBA example the VBA subroutine OpenSPDFile() is used for opening an existing
Pro-Designer processs file file. The VBA function CreateObject("SPDFlowsheet") is used
for creating and returning a reference to the Application server object. In this case
SPDFlowsheet is the application type class string of the SuperPro Designer Server (use
EPDFlowsheet for the EnviroPro Designer Server), and superProApp is the server object
that represents an instance of the Pro-Designer application. The ShowApp() Pro-Designer
COM subroutine is used to activate the Pro-Designer application and display it in its
current size and position. The OpenDoc (spfFile) COM function is used for opening the
Pro-Designer file and making it the active object. This function will also return a reference
to a Document server object. The file name spfFile is a string and specifies the full path and
name of the object to be retrieved. Alternatively one could create a new instance of Pro-
Designer application and assign it to the superProApp server object (Set superProApp =
New Designer.Application) or you may use the New keyword to declare and create an
instance of the object (Dim superProApp As New Designer.Document) at the same time.

Example 2: Get a reference to an object provided by the Pro-Designer server.

Public superProApp As Designer.Application

Public superProDoc As Designer.Document

Sub OpenSPDFile(spfFile As String)

Set superProApp = New Designer.Application

superProApp.ShowApp
Set superProDoc = superProApp.OpenDoc (spfFile)

End Sub

or

Public superProDoc As Designer.Document

Sub OpenSPDFile(spfFile As String)

Dim superProApp As New Designer.Application

superProApp.ShowApp

Set superProDoc = superProApp.OpenDoc (spfFile)

End Sub

Similar to Example1 you could create a new instance of Pro-Designer and assign it to the
superProApp server object (Set superProApp = New Designer.Document) or you may use
the New keyword to declare and create an instance of the object (Dim superProApp As
New Designer.Application), and also initialize the document object superProDoc by
assigning it the reference of the document object from the OpenDoc COM function (Set
superProDoc = superProApp.OpenDoc (spfFile). Note that the superProDoc and
superProApp have been declared as global variables in all the above scripts except the last
one where the application object variable superProApp is local. By using the keyword
Public the objects can be used in all the procedures and modules of the VBA project.

The file name spfFile specifies the full path and name of the object to be retrieved.

In the following VBA example the VBA function GetObject() is used to return a reference
to an object provided by an ActiveX component in this case the Pro-Designer case files.

Function DocumentObject(spfFile As String) As Object

Set DocumentObject = GetObject(spfFile)

End Function
Example 3: Closing the Pro-Designer file

Sub CloseSPDFile(spfFileOne As String)

Dim superProDoc As Designer.Document

Set superProDoc = GetObject(spfFileOne)

superProDoc.CloseDoc false

End Sub

In this VBA example the GetObject function is used to get a reference to the desired Pro-
Designer case file, and the CloseDoc function to close this file without saving it. The file
name spfFileOne specifies the full path and name of the object to be retrieved.

Sub CloseSPDFile(spfFileOne As String)

superProDoc.CloseDoc true

superProApp.CloseApp

End Sub

Here the Pro-Designer file is saved first and then closed by using the COM document
subroutine CloseDoc and passing true as an argument. To close the Pro-Designer app, the
application subroutine CloseApp is called with the application object superProApp. Both
superProApp and superProDoc have been previously declared and defined as global
variables and initialized elsewhere. See Examples 1 & 2.

Sub CloseSPDFile(spfFileOne As String)

superProApp.CloseAllDocs false

superProApp.CloseApp
End Sub

This script demonstrates how you may close all the open Pro-Designer files without saving
them with the use of the application function CloseAllDocs. It also calls CloseApp to close
the application. Note that both CloseAllDocs and CloseApp functions are called with the
application object superProApp.

Simulation Related Scripts

Example 1: Performing material balances and economic calculations after setting a


flowsheet variable

Function SetAndGetThroughput(throughput As Double) As Double

Dim var1 As Variant

Set superProDoc = DocumentObject()

var1 = throughput

superProDoc.SetFlowsheetVarVal VarID.annualThroughput_VID, var1

superProDoc.DoMEBalances var1

superProDoc.DoEconomicCalculations

superProDoc.GetFlowsheetVarVal VarID.annualThroughput_VID, var1

SetAndGetThroughput = CDbl(var1)

End Function
The above script is an example of a function that performs several tasks. The
SetAndGetThroughput function takes as an argument the desired value of the throughput. It
can be called from an Excel cell or another VBA function. First the
SetFlowsheetVarVal COM function is used to set the value of the throughput. Then the
DoMEBalances and DoEconomicCalculations COM subroutines are called to solve the
simulation case and perform economic calculations. Finally in order to check that the
throughput was correctly set GetFlowsheetVarVal COM function is used to retrieve the
value of the throughput from the Designer file and its value is returned with the
SetAndGetThroughput function. Note that in the function statement of
SetAndGetThroughput it is specified that the throughput is a Double data type and
therefore you do not need to cast var1 to a Double.

Data Exchange Scripts

Data exchange VBA script examples include the following:

Scripts for Flowsheet variables

Scripts For Section Variables

Scripts For Equipment Variables

Scripts For Equipment Contents Variables

Scripts For Ingredient Variables

Scripts For Operation Variables

Scripts For Procedure Variables

Scripts For Stream Variables

For information on how to properly use the variant data type to access the Pro-Designer
COM variables look at How to Use Variant Data Types in VBA Scripts.

Error Handling Scripts

Examples of VBA scripts used for error handling:

Example 1: Retrieving the COM Error Message


Sub GetErrorMsg()

Dim var1 As Variant

Set SuperProDoc = DocumentObject()

SuperProDoc.GetCOMErrorMsg var1

Dim errorMsg As String

errorMsg = var1

Worksheets("Sheet1").Range("B80") = errorMsg

End Sub

The above script is an example of a subroutine used to retrieve the latest error message that
was generated during an unsuccessful (previous) use of another Pro-Designer
GetCOMErrorMsg COM method. In this case the string with the error message is then
displayed in worksheet "Sheet1" and cell B83. If for example you try to set / get a
flowsheet variable and the function returns False you can use this VBA subroutine to find
out why the data exchange failed.

Example 2: Retrieving the COM error Message after failing to retrieve a flowsheet
variable.

Sub GetFlowsheetVar()

Dim var1 As Variant

Dim bReturn As Boolean

Set SuperProDoc = DocumentObject()

bReturn = SuperProDoc.GetFlowsheetVarVal(incorrect_VID, var1)

If bReturn Then
Worksheets("Sheet1").Range("B81") = CDbl(var1)

Else

SuperProDoc.GetCOMErrorMsg var1

Worksheets("Sheet1").Range("B82") = CStr(var1)

End If

End Sub

The above script is an example of a subroutine used to retrieve a Flowsheet variable with an
incorrect VarID. This results in the bReturn which is a Boolean data type to be false and in
this case the script calls the GetCOMErrorMsg to retrieve the error message and display it
in Worksheet "Sheet1" and cell B82. Note that var1 could be a double data type if the
VarID was correct, but in this case it is a String and cast accordingly.

Example 3: Checking the consistency of data exchange

Sub IsCOMSimDataComplete()

Dim SimDataOK As Boolean

Set SuperProDoc = DocumentObject()

SimDataOK = SuperProDoc.IsCOMSimDataComplete

Range("B77") = SimDataOK

The above script is an example of a subroutine used to check whether the data exchange
using the COM functions was consistent. The Pro-Designer COM method
IsCOMSimDataComplete is used. Most Data Exchange methods (Variable Data Exchange
Methods) check and therefore forbid these inconsistencies but there are some cases that all
data exchange has to be completed before checking. For example you can independently set
the mass fractions of components in a stream. When the IsCOMSimDataComplete is called
it will verify that the sum of all mass fractions in the streams is equal to 1.0.
Report Creation Related Scripts

Examples of general-purpose application related scripts that use the Pro-Design report
creation related COM methods:

Example 1:

Sub CreateReports()

SpecifyReportOptions

CreateIDReport

CreateStreamReport

CreateCashFlowReport

End Sub

Sub SpecifyReportOptions()

Dim superProDoc As Designer.Document

Dim footer As Variant

footer = CStr("COM generated report")

Set superProDoc = DocumentObject()

superProDoc.SetReportFormat rtF_EF

superProDoc.SetReportGeneralOptions footer_VID, footer

End Sub

Sub CreateIDReport()

Dim superProDoc As Designer.Document


Set superProDoc = DocumentObject()

superProDoc.GenerateReport inputDataReport_VID

End Sub

Sub CreateStreamReport()

Dim superProDoc As Designer.Document

Set superProDoc = DocumentObject()

superProDoc.GenerateReport streamReport_VID

End Sub

Sub CreateCashFlowReport()

Dim superProDoc As Designer.Document

Set superProDoc = DocumentObject()

superProDoc.GenerateReport cashFlowReport_VID

End Sub

In this VBA example the VBA Subroutine CreateReports() is used for calling 4 other
subroutines to specify the reports options and then create certain reports, the Input Data,
Stream and Cash Flow reports (with default file name & location) .

Example 2:

Sub CreateReportToFile()

Dim superProDoc As Designer.Document

Set superProDoc = DocumentObject()


Dim fileName As String

superProDoc.SetReportFormat htm_EF

fileName = "C:\Program Files\Intelligen\SuperPro Designer


6.0\Examples\COM\EconEvalReport.htm"

superProDoc.GenerateReportToFile fileName, econEvalReport_VID

End

In this VBA example the VBA Subroutine CreateReportToFile() is used for creating the
economic evaluation report, and saving it to the specified file name and location.

Excel Data Link Related Scripts

Examples of general-purpose application related scripts that use the Pro-Design report
creation related COM methods:

Example 1:

Dim workbookName As Variant

Dim rangeName As Variant

Sub SetProcedureTableOptions()

workbookName = CStr("C:\Program Files\Intelligen\SuperPro Designer


6.0\Examples\COM\COMEx6.xls")

rangeName = CStr("RangeProc")

Dim procName As String

procName = "P-20"

Dim varBool As Variant

varBool = CBool(True)
spfFileOne = Worksheets("Charts Examples").range("B10")

spfFileOne = spfFileOne + "\" + Worksheets("Charts Examples").range("B11")

Set superProDoc = DocumentObject(spfFileOne)

superProDoc.SetXLSLinkDataForProcedureOperSeqTable procName, workbook_VID,


workbookName

superProDoc.SetXLSLinkDataForProcedureOperSeqTable procName, rangeName_VID,


rangeName

superProDoc.SetXLSLinkDataForProcedureOperSeqTable procName,
bEraseExtraCellArea_VID, varBool

superProDoc.SetXLSLinkDataForProcedureOperSeqTable procName,
bExpandExtraCellArea_VID, varBool

superProDoc.SetXLSLinkDataForProcedureOperSeqTable procName,
bIncludeColumnHeaders_VID, varBool

superProDoc.SetXLSLinkDataForProcedureOperSeqTable procName,
bIncludeRowHeaders_VID, varBool

End Sub

In this VBA example the VBA Subroutine SetProcedureTableOptions() is used for setting
the data link variables for the Activity Overview table of a procedure with the name P-20.

Object Export Scripts

Some examples of VBA scripts used for exporting objects such as Charts, Pictures, etc.

Example 1: Exporting the ingredient consumption chart to the clipboard

Sub ExportIngrConsumptionClipboard()
Set SuperProDoc = DocumentObject("filename")

Dim ingrName As String

Dim noBatches As CLng

ingrName = CStr("Water")

noBatches = CLng(3)

Dim consumptionType As Long

consumptionType = cleaningAgent_ICT

SuperProDoc.ExportIngredientConsObject ingrName, Clipboard_ED, "", noBatches,


consumptionType, False, True

End Sub

The above script will export the consumption tracking chart of the ingredient "water" to the
clipboard (no filename has been given, note the empty string of the third argument). The
number of batches have been set to 3 and the consumption type is as a cleaning agent.
Also we do not want to take in account the consumption of water in entities (False), but we
do want to include the consumption of water in mixtures (True).

Scripts For Enumerators

Some examples of VBA scripts demonstrating how enumerators can be used:

Enumerating All Input Streams in a Unit Procedure

Enumerating All Unit Procedures in a Flowsheet

Enumerating All Reactions in an Operation of a Procedure

COM Application Examples


Several examples that utilize the COM Server are included with this manual. The process
files were first created either SuperPro or EnviroPro (*.spf / *.epf). The Excel workbooks
are used further studying these process files with a different incentive each time (sensitivity
analysis, risk analysis, custom report creation etc.). These tasks are accomplished by
accessing the Designer Library Methods using VBA scripts which are available in the
Excel files. The excel examples can be found in the installation directory of Pro-Designer
under the folder /Examples/COM/Excel/.

Excel File SPF / EPF File Description


1 COMex1.xls COMex1.spf Sensitivity Analysis Example
2 COMex2.xls COMex2.spf Data Transfer and Parametric Study
Example
3 COMex3.xls COMex3.epf Environmental Example
4 COMex4.xls COMex4.spf Risk Analysis Example
5 COMex5.xls COMex5.spf Custom Report Creation Example
6 COMex6.xls COMex6.spf Report Exporting Example
7 COMex7.xls COMex7.spf Object Linking Example
8 COMex8.xls COMex8,spf Enumerating Example
Sensitivity Analysis Example

About

A simplified sensitivity case study example is presented in order to demonstrate the


usefulness of the Pro-Designer COM server to engineering /economic parametric studies,
and in order to provide you with examples of basic VBA scripts. A sample Excel workbook
(ComEx1.xls) is provided along with a sample Pro-Designer simulation case
(ComEx1.spf). Please follow the instructions in Setting Up The Project the first time you
open the excel file.

To find more about the structure of the sample workbook and the available examples
please, see The Excel Workbook for the Sensitivity Analysis Example.

To find more about the specific process file and the sensitivity analysis example
please, see The Process File for the Sensitivity Analysis.

The Process File for the Sensitivity Analysis

The process file chosen for the sensitivity analysis is variation scenario of the Synthetic
Pharmaceutical process file, inspired from the Synthetic Pharmaceutical example(SPhr6_0f
as described in the tutorial). This is a typical example of a pharmaceutical industrial
process. A synthetic pharmaceutical intermediate is formed by condensation of quinaldine
and hydroquinone. The process plant shown in the next figure was designed to include
three stirred tank reactors, two nutsche filters and a tray dryer. The process is described in
more detail in the tutorial.
Sensitivity Analysis Motive:

The plant was originally designed for an annual throughput of 34,000 kg /year, which was
the original objective. The operation of the plant was optimized by rearranging and reusing
several equipment as shown in the above flowsheet. However during the design phase a
market study performed by the management concluded that the pharmaceuticals industry
market could easily absorb up to 100,000 Kg/ year of this product. Given that it was
possible for the company to invest up to a maximum of $50,000,000 for this activity they
questioned the design engineers about the feasibility of a higher capacity plant, as well as
its profitability. Since no equipment were yet bought, the engineers decided that with out
changing their recipe (except for times required for certain operations) they would perform
a parametric study to access the impact of the annual throughput change on the economics
indices that are used to measure the profitability of the project as described in Impact of
Throughput Variation.

The Excel Workbook for the Sensitivity Analysis Example

The ComEx1.xls Excel Workbook contains the following spreadsheets:


Readme: Provides useful information, that enables you to use this workbook in
order to visualize the Throughput analysis and the data exchange examples.

Throughput Analysis: This spreadsheet is used to perform a sensitivity analysis


study on the impact of the annual plant throughput on the profitability of the plant.
Follow the instructions for opening the file and changing the input parameters. See how
the plots of the various economic factors are created.

Data Exchange Examples: This spreadsheet contains simple data exchange


examples, where you can access the value of several Pro-Designer variables. The use of
several data exchange VBA scripts is illustrated. Follow the instructions on the
worksheet to access several variables.

If you select Tools / Macro / Visual Basic Editor from the Excel main menu (or the
Developer Tab and click on Visual Basic icon button in Excel 2007), the Visual Basic
Editor Interface comes up as described in Setting Up The Project and you can navigate this
interface to browse through the VBA scripts or change / add to the scripts used in this
example. Initially you may get a blank view with the project contents displayed on the left
pane. Double click on This Workbook, or expand the Modules folder and double click on
any of the modules to view the code in the right pane, as shown in the next picture.
For more on VBA scripts please, see VBA Sample Scripts.

Impact of Throughput Variation

As the process was still in design phase, it was possible to use the Pro-Designer OLE
Server to evaluate the profitability of plants with different maximum capacity. This allows
the engineers to compare the profitability of a range of investments (up to the $50,000,000
company limit for the investment) in order to determine what is the optimum size / capacity
the plant should be designed for (up to the 100,000 kg/ year market-requirement limit). In
the SuperPro simulation of ComEx1.spf all equipment are in design mode. For each run the
equipment were resized to have 100 % Capacity Utilization. The recipe was kept constant
in terms of the use of equipment, the order of procedures and operations, but the plant batch
time varied with the batch sized, as the time required for several operations is size
dependent (i.e. Charging and Transfers at constant rate).

The Throughput Analysis worksheet in the ComEx1.xls Excel workbook demonstrates this
sensitivity analysis. In order to vary the annual throughput the batch size was increased.
The SetAndGetBatchThroughput(throughput) function involves setting the batch size,
performing material balances and economic calculations and retrieving the value of the new
batch size (to check whether for some reason this was not achievable). The VBA script for
this function can be found in Module 1. Once a batch size was set the SPD solved the
material balances, sized the equipment accordingly and calculated the maximum number of
batches per year. Since the plant is in Design Mode, and the plant batch time changed, so
did the number of batches, so every time there was an increase in the plant batch size, the
new value of the annual throughput, was obtained with the GetThroughput(double)
function. So for each value of annual throughput the values of the important economic
evaluation factors such as Profit, Revenue, ROI, IRR, Unit Costs etc. are obtained. The
simulations were performed for a range of batch throughput of 200 - 2600 kg/batch which
corresponded to annual throughput range 30400 80600 kg /year and a range of
$15,746,650 - $48,908,817 for the total investment.

Examining how the revenues / net profits change with the annual throughput one can see
that they increase linearly with the plant capacity as shown in the following figure:
From the above figure it appears that the plant should be run at the highest capacity.
However, taking a closer look to the indices used to evaluate the profitability of investment,
mainly the Return on Investment (ROI) and the Internal Rate of Return (IRR) before and
after tax we notice that the value of these indices does not vary linearly with throughput.

Looking the variation of economic indices, the engineers have concluded that the
investment is more profitable if the annual throughput is in the range of 58800 64800 kg
/yr since the ROI / IRR are higher for this capacity. This is due to the fact that for an annual
throughput of up to about 62000 kg they experience the economy of scale benefits. These
occur when the revenues rise faster than the expenses because production is increased by
utilizing larger vessels, but not more vessels and the cost of a vessel with respect to its size
is not linear [1]. Beyond the point of 62,000 kg/yr, they need to install multiple equipment
(which is similar to building another plant) and they no longer have those benefits. The
company can of-course decide to design the plant at the highest capacity possible, as long
as the ROI value is acceptable.

:
References

1. Harrison R.G., Podd P., Rudge A.R., Petrides D.P. (2003), Bioseparations Science and
Engineering (Chapter 11), Oxford University Press.
Data Transfer and Parametric Study Example

The purpose of this example is first to illustrate how you can use the COM functions to
vary a process parameter and assess its impact on the economic decision variables (similar
to the Sensitivity Analysis Example) and second to provide more examples of data-
exchange between the Pro-Designer and Excel. A sample Excel workbook (ComEx2.xls) is
provided along with a sample Pro-Designer simulation case (ComEx2.epf).

Look at The Excel Workbook for the Data Transfer Example for more information on this
example. Please follow the instructions in Setting Up The Project the first time you open
the excel file.

The Excel Workbook

The ComEx2.xls Excel Workbook contains the following spreadsheets:

Readme: Provides useful information that enables you to use this workbook in order to

create and export reports and charts.

Parametric study: This spreadsheet contains an example on how you can vary a process

variable, in this case the annual operating time, to examine the effects on the economic
indicators.

Data Exchange: This spreadsheet contains data exchange examples, where you can access the

value of several Pro-Designer variables (flowsheet variables, operation specific/general


variables, equipment variables, consumable variables). The use of several data exchange
VBA scripts is illustrated. Follow the instructions on the worksheet to access several
variables.

If you select Tools / Macro / Visual Basic Editor from the Excel main menu (or the
Developer tab and click on the Visual Basic icon button in Excel 2007), the Visual Basic
Editor Interface appears as described in Setting Up The Project and you can navigate this to
browse through the VBA scripts or change / add to the scripts used in this example. Expand
the Microsof Excel Objects or the Modules folders and click on any of the sheets/ modules
to view the code in the right pane. For more information on VBA scripts please, see VBA
Sample Scripts

Risk Analysis Example

Most chemical, pharmaceutical, and environmental industrial processes involve uncertainty


and variability in their technical and market parameters, attributed both to external
economic and to internal process/equipment inherent limitations. Variability in operational
parameters has a direct impact on process time variation and therefore plant throughput, as
well as on product quality, manufacturing cost, environmental assessment, and profitability.
Market associated risks including cost of raw materials, product selling price, and future
product supply and demand have a direct effect on the production cost and revenues.
Variability in the supply and cost of raw materials is quite common. The price of low cost,
high volume materials is typically linked to the price of oil. The price of low volume, high
cost materials is typically linked to the supply and demand conditions. If the growth in
demand outpaces the growth in supply, the prices will increase and vice versa. Additional
constraints exist in the pharmaceutical industry, due to the pressure to rush to market the
patented new compounds with regulatory approvals. As a result, processes for new products
are rarely optimized and this leads to uncertainty and variability in operational parameters.

Process simulation tools can be used for robust modeling and evaluation of the average
situation (base case or most likely scenario). Assessment of the impact of uncertainty and
estimation of the range of possible outcomes is an additional challenge. The integration of
the process simulation tool (Pro-Designer) with risk analysis tools, which allow for
stochastic modeling of the uncertain variables, provides probabilistic forecasts of the output
variables enabling us to evaluate the impact of uncertainty/variability on these process
decision variables. The quantification of risks and the overall process variability is
important to engineers involved at the process development stage when targeting risk
minimization, process optimization and process validation, as well as managers at the
decision-making level when assessing the feasibility of batch processes under uncertainty
and strategic planning.

An example is presented in which the The Designer Type Library is used for integrating
SuperPro Designer with a risk analysis tool such as Crystal Ball (created by
Decissioneering, Inc. and acquried by Oracle corporation) in order to evaluate a
pharmaceutical process. A sample Excel workbook (ComEx4.xls) is provided along with a
sample Pro-Designer simulation case (ComEx4.spf). Please note that to run the example
you must have Crystal Ball installed on your PC. For versions of Excel prior to 2007 and
Crystal Ball version 7 or older versions please follow the instructions in Setting Up the
Project with Add-Ins the first time you open the excel file. For Excel 2007 and Crystal Ball
version 7 or newer please follow the intsructions in Setting Up the Project without Add-Ins.

To find more about the specific process file and the sensitivity analysis example
please, see The Process File for the Risk Analysis Example.

To find more about the structure of the sample workbook and the available examples
please, see The Excel Workbook for the Risk Analysis Example.

Setting Up the Project with Add-Ins

The steps described here are similar to the ones in Setting Up The Projectdescription. In
this case we consider an example that uses an Excel add-In Crystal Ball, which you must
have installed on your computer in order to run this example.
A sample Excel spreadsheet (ComEx4.xls) is provided along with a sample Pro-Designer
simulation case (ComEx4.spf). This Excel spreadsheet contains many useful scripts for
using the COM functions. It can be used for risk analysis as described in Risk Analysis
Example

Before you start using this example you must perform the following tasks:

1. Open the ComE41.xls file with Excel

2. Choose "Enable Macros" when opening the excel file

3. Specify the path and name of the Pro-Designer file in designed cell (i.e.
C:\Designer\ComEx4.spf)

4. From the Excel menu select Tools / Add Ins and select (check) the Crystal Ball add-in

5. From the Excel main menu chose Tools /Macro /Visual Basic Editor.

6. From the VB Editor main menu select Tools / References.

7. Scroll down in the list until you find the CB.xls. Check that library to be included in
your references.

8. Continue scrolling until you find the SuperPro Designer (This is the Designer Type
Library exposed by the Pro-Designer OLE Server). Check that library to be included in
your references.

By now the Designer library should be included in your project. You can view the libraries
included in the project if you display the VBA object browser (click F2 or click on the icon

from the standard toolbar, or select View/Object Browser from the VBE main menu).
If you look at the list of libraries the Designer library should now be included.

You can now save your Excel worksheet. Next time you open the file, you do not have to
repeat these steps. Just verify that the Designer library is added to your Excel references by
checking the object browser.

Setting Up the Project without Add-Ins

Before running the Risk Analysis example first follow the steps described in Setting Up
The Project.

Setting up the project to work with Excel 2007 and newer versions of Crystal Ball
(versions >= 7.x) is as simple as running Crystal Ball. This will run MS Excel 2007 and
will present you with a welcoming screen were you may select to Open your Excel
Workbook in this case the example ComEx4.xls.
Excel has a new Crystal Ball tab in the Ribbon bar, which can be used to define the
assumptions, decisions and forecasts fields in the excel workbook. Also by clicking on the
Run Preferences button one can set the number of trials to run, precision, and other running
preferences. More information can be found in the Crystal Ball help documentation.

After running preferences have been set, you may run the risk analysis simulation by
clicking on the Start button or end the simulation by clicking the Stop button.

The Process File for the Risk Analysis Example

In the sensitivity analysis example the process file chosen is a variation scenario of the
Synthetic Pharmaceutical process file, inspired from the Synthetic Pharmaceutical
example(SPhr6_0f as described in the tutorial). This is a typical example of a
pharmaceutical industrial process. A synthetic pharmaceutical intermediate is formed by
condensation of quinaldine and hydroquinone. The process plant shown in the next figure
was designed to include three stirred tank reactors, two nutsche filters and a tray dryer. The
process is described in more detail in the tutorial.

Information on general methodology used for this example is given in the Methodology
in Uncertainty Study section.
Information on the base case simulation with the SuperPro Designer is given in the
Base Case Scenarion description.

Information on the uncertainty analysis performed using the integrated SuperPro


Designer and Crystal Ball tools is given in the Uncertainty Analysis description.

The information provided in this manual for this example is extracted from our publication:
Analysis and Evaluation of Batch Pharmaceutical Processes: Integration of Process
Simulation and Risk Analysis Tools which can be found on our website:

http://www.intelligen.com/literature.shtml

The Excel Workbook for the Risk Analysis Example

The ComEx4.xls Excel Workbook contains the following spreadsheets:

Readme: Provides useful information, that enables you to use this workbook in order to

visualize the Monte Carlo / SPD Simulation

: This spreadsheet is used to perform a risk analysis study for assessing the
Study Case

impact of variability and uncertainty in operational and market parameters on the


evaluation indices of a pharmaceutical process. Follow the instructions for opening the
file and changing the input parameters. For more information on the scripts used, see
VBA Scripts Used for Risk Analysis.

Visit the Visual Basic Editor interface to navigate through the VBA scripts to add or
modify them according to your needs. Please, see Setting Up The Project for more
information on the Visual Basic Editor interface.

Methodology in Uncertainty Study

To perform the work presented in this paper, we combined the deterministic simulation
capabilities of SuperPro Designer application with the stochastic (Monte Carlo) simulation
capabilities of Crystal Ball in order to study how the variance in selected process
parameters affects the final process decision variables.

Crystal Ball from Oracle, is an Excel add-in application that facilitates Monte Carlo
simulation which enables the user to designate the uncertain input variables and specify
their probability distributions and to select the output (decision) variables whose values are
recorded during the simulation. For each simulation trial (scenario) Crystal Ball generates
random values for the uncertain input variables based on their probability distributions
using the Monte Carlo method. The random value generation attempts to imitate
randomness in the real world. Based on the recorded output (decision) variables, Crystal
Ball determines the variance of the decision variables by generating probabilistic
distributions and performs dynamic sensitivity analysis. All input variables are perturbed
simultaneously and their interactions are captured in the fluctuations of the output. Crystal
Ball also calculates the uncertainty involved in the outputs in terms of their expected value
(mean, median, mode), variance, standard deviation, and their complete frequency
distribution. In addition it generates various reports and charts such as the tornado and the
sensitivity analysis charts.

The methodology used for integrating the two tools, takes advantage of the Component Object Module
(COM) technology of SuperPro Designer (General Info on the Designer Type Library)
and is illustrated in the following figure:

The probability distributions of the parameters of the uncertain parameters were defined in
Crystal Ball. Running the Crystal Ball application, the Monte Carlo method is used to
create random values for these parameters according to their distribution. In typical Crystal
Ball runs the decision variables (output) are linked to the input variable in Excel using a
model through an equation or an Excel macro. In our case Excel macros employing VBA
scripts were used to link the input (uncertain) parameters as well as the output decision
variables to the SuperPro Designer application as inputs and outputs (respectively) to the
processs file. For each scenario the values the input-uncertain parameters are passed to the
process simulator, which is employed to perform material and energy balances, scheduling
and capacity utilization calculations, cost estimation and economic evaluation. The values
of the objective decision variables (the forecasts in the Crystal Ball simulation) are outputs
of the process simulator. These are passed back to Excel spreadsheet, again using macros
employing VBA scripts and are recorded by Crystal Ball as forcasts.

For more information on the scripts used in this example, see VBA Scripts Used for Risk
Analysis.

VBA Scripts Used for Risk Analysis


The scipts used in this example can be accessed by viewing the code in This Workbook
and Module1 to Module4 in the Visual Basic Editor. This Workbook and Module1
contain general purpose scripts described in VBA Sample Scripts Examples of VBA
Scripts.

The Script for the function SetVariablesAndSolve() is included in Module3. This


function is called from cell B29 in the Study Case spreadsheet. This function is used to take
the input parameter values from the Excel spreadsheet set the values of the corresponding
variables in the SuperPro Designer Case. It then calls the DoMEBalances and the
DoEconomicCalculations COM functions for solving the simulation case and performing
economic calculations. At the end the function returns an output variable, in this case the
payback time. Some of these input values are Crystal Ball Assumptions (as indicated in the
Study Case spreadsheet) and they change in each trial. Every time the value of these
parameters changes the function SetVariablesAndSolve() is executed and returns a new
output value.

Function SetVariablesAndSolve(Cost1 As Double, Cost2 As Double, Price As Double,


rate1 As Double, rate2 As Double, rate3 As Double, rate4 As Double, time1 As Double,
time2 As Double, time3 As Double) As Double

Dim var1 As Variant

Dim var2 As Variant

Dim procName As String

Dim opName As String

'Set Raw Material Cost

var2 = SetHydroquinoneCost(Cost1)

var2 = SetQuinaldineCost(Cost2)

'Set Selling Price

var2 = SetFinalProductPrice(Price)
'Set Cloth Filtration Flux (P-4)-from L/m2 hr to m3/m2 s

rate1 = rate1 / 3600000

procName = "P-4"

opName = "Product Isolation"

var2 = SetFiltrateFlux(procName, opName, rate1)

more code

'Set Chlorination time P-1 (h)

time1 = time1 * 3600

procName = "P-1"

opName = "Chlorination"

var2 = SetProcessTime(procName, opName, time1)

more code

'Perform ME Balances

superProDoc.DoMEBalances var1

'Perform Economic Calculations

superProDoc.DoEconomicCalculations
superProDoc.GetFlowsheetVarVal VarID.paybackTime_VID, var1

SetVariablesAndSolve = var1

End Function

The function, whose code is shown above, calls several other VBA functions for setting the
SuperPro Designer case variables. These are included in Module2. A sample script for the
function used to set the filtrate flux is shown here:

Function SetFiltrateFlux(procName As String, opName As String, InDouble As Double)

Dim var1 As Variant

Dim str1 As String

Dim str2 As String

str1 = CStr(procName)

str2 = CStr(opName)

var1 = CDbl(InDouble)

superProDoc.SetOperVarVal str1, str2, VarID.filtrateFlux_VID, var1

SetFiltrateFlux = var1
End Function

Finally in Module4 you can find all functions for obtaining the output values, used in cells
B33 to B43 in the Study Case spreadsheet. In this simulation only the first two outputs
(Number of Batches and Main Product Cost) were defined as forecast variables in Crystal
Ball and their output values are recorded.

The function for obtaining Main Product Cost is:

Function GetMPC(InDouble) As Double

Dim var1 As Variant

var1 = InDouble

'Get the new main revenue cost ($ /kg)

superProDoc.GetFlowsheetVarVal VarID.mainRevenueCost_VID, var1

GetMPC = var1

End Function

And the function for obtaining Number of Batches per Year is :

Function GetNumberOfBatches(InDouble) As Double

Dim var1 As Variant

var1 = InDouble

superProDoc.GetFlowsheetVarVal VarID.numberOfBatchesPerYear_VID, var1


GetNumberOfBatches = var1

End Function

If you are interested to see the variation caused in the other output variables you can set
them as forecast variables the next time you run the Crystal Ball Simulation.

: The object superProDoc is declared globally and defined in the ThisWorkbook object
Note

of the COMEx4.xls file. For more information on object initializations see Declaring and
Initializing Pro-Designer Server Objects.

Base Case Scenarion

The base case scenario involves using an average (or most probable) value for the uncertain
input variables. A brief summary of the results relevant to the case study objectives (i.e.
36,000 kg of final product per year at a cost of no more than $250/kg) is presented.

The process simulator calculates that each batch generates 246 kg of final product. The
recipe scheduling information dialog of SuperPro Designer provides a summary of the
process scheduling: the batch time (time from start to finish of a batch) is 99.2 h. and the
processs min cycle time (time between consecutive batches) is 52.3 h. This is determined
by the cycle time of R-102, which is the scheduling bottleneck equipment. Hence if the
plant can operate under its min cycle time, it can process 150 batches per year. To meat the
target production of 36,000 kg/year, a minimum of 147 successful batches is required per
year.

The equipment utilization and scheduling is displayed in the following figure for three
consecutive batches.
Multiple rectangles for the same equipment (e.g. for R-101, R-102, NFD-101, and R-103)
within a batch represent reuse (sharing) of the same equipment by multiple unit procedures.
The flow of material through the equipment is shown with the red arrows for the first batch.
Equipment R-102 has the longest cycle time and is the current time bottleneck that
determines the maximum number of batches per year. Any process changes that increase
the cycle time of R-102 will result in fewer batches per year and lower annual throughput.
Please note that such changes are not limited to the operations of P-9. Delays in the
operations of the preceding procedures (P-1, P-3, P-4, P-5, P-6, P-7, and P-8) are
propagated to P-9.

In addition to the M&E balances and scheduling calculations the process simulator
performs thorough cost analysis and overall project economics, estimating the capital as
well as the operating cost. The economic evaluation report generated by the process
simulator reveals that the estimated unit production cost is $237/kg, which is below the
upper limit target of $250/kg. The pie chart (Figure 3) shows the distribution of the
manufacturing cost. The facility overhead costs account for 39%, followed by raw material
costs at 26% and labor for 21 %. The cost distribution of the raw material can be seen in the
following table.

Bulk Raw Material Unit Cost Annual Amount Annual Cost %

($/kg) (kg) ($)

Chlorine 3.300 19,075 63,000 2.72


Na2CO3 6.500 22,387 146,000 6.30
Water 0.100 631,933 63,000 2.73
HCl (20% w/w) 0.150 76,168 11,000 0.49
NaOH (50% w/w) 0.150 43,581 7,000 0.28
Methanol 0.240 117,895 28,000 1.22
Hydroquinone 4.000 36,534 146,000 6.32
Carb. TetraCh 0.800 105,973 85,000 3.67
Quinaldine 32.000 31,673 1,014,000 43,85
Sodium Hydroxide 2.000 15,803 465,000 20,13
Isopropanol 1.100 423,008 465,000 20,13
Charcoal 2.200 3,378 7,000 0.32
HCl (37% w/w) 0.170 46,363 8,000 0.34
Nitrogen 1.000 236,635 237,000 10.24
TOTAL 1,810,406 2,311,000 100.00

Quinaldine is the most expensive raw material accounting for around 44% of the raw
materials cost which translates to about 11.4% of the overall cost as shown in the next
figure:

The results from the base case scenario meet the production and unit cost targets, but with
small margins. Consideration of variability in input parameters can help us quantify the
risks for this project. Therefore an Uncertainty Analysis study is performed.

Uncertainty Analysis

Variable Base Case Distribution Variation

Value & Range

Quinaldine 32 ($/kg) Normal S.D=6[10-110]


Chlorination Reaction Time in 6 hr Triangular [4-8]
P-1
Condensation Reaction Time in 6 hr Triangular [4-8]
P-1
Cloth Filtration Flux in P-4, P-6, 200(L/m2-h) Triangular [150-250]

P-8, P-10 (Equipment NFD-101)

As part of the uncertainty analysis we focus on parameters that exhibit uncertainty or


variability and can have a direct impact on our objective decision variables of this study
case: the unit cost and the annual throughput (or equivalently the number of batches).
Several process/technical parameters that exhibit variability/uncertainty were identified
based on available process data, and a static sensitivity analysis was used to determine
which of these parameters have a greater impact on the decision variables. The crucial input
variables that were finally chosen for the Monte Carlo simulation, and their probability
distribution (estimated using technical and market data) are shown in the above table.

As mentioned in Base Case Scenarion the major contributors to the unit production cost are
facility-dependent cost, raw material cost, and labor-dependent cost. Since this process is
carried out on an existing facility we do not expect a great variation in the facility
dependent cost. We do however expect to have significant uncertainty in the purchasing
price of the key ingredient (quinaldine) and since this is the most expensive raw material,
we anticipate it will have significant impact on the unit production cost. The probability
distribution of quinaldine, was estimated by fitting and extrapolating historical market data.

The other objective variable, the annual throughput /number of batches, is determined by
the plant cycle time. Therefore we consider variability in the operational parameters that
may have an impact on the cycle time of the process and consequently on its annual
throughput. Variation in operational parameters results in process time variation and hence
variation in the annual number of batches and throughput of a plant. In this study we
consider time variability that is inherent to the process (it is the result of natural variability
and not control / mechanical failure limitations) and can cause delays on the time
bottleneck, in this case reactor R102 in procedure P-9, and consequently affect the cycle
time. Any delays in procedures upstream P-9 can increase the cycle time. We therefore
focus on the duration of the reaction operations that are upstream of P-9 and may exhibit
inherent variability. These include the reaction times for chlorination in P-1 and
condensation in P-3, which depend on catalyst activity/performance. In addition the
filtration fluxes can vary significantly due to fouling. Here we consider only filtration
procedures that relate to P-9 (upstream procedures). We also consider the filtration flux in
P-10 (even though it is downstream P-9) because the filtration flux in NFD-101 determines
the transfer out of vessel R-102 in P-9 and therefore has a direct effect on the cycle time of
that (bottleneck) procedure. More over the variation in these operational parameters can
have a direct impact on the unit production cost. The variability in the durations of reaction
operations and filtration times is best estimated based on laboratory and pilot plant data
with a triangular distribution (as shown in the table above).
The two forecast variables considered in this study include the number of batches that can
be processed per campaign and the unit production cost. These are key performance
variables important for production planning and process economic evaluation. The output
variables, of the combined SuperPro Designer - Crystal Ball simulation, are quantified in
terms of their expected value, variance, standard deviation, median, mode, and probability
distribution.

The results for the Number of Batches is shown in the next figure:

The results for the Unit Production Cost in the next figure:

Based on our assumptions for the variation of the input variables we note that average
values (mean / median /mode) calculated for the decision variables satisfy the objective. A
certainty analysis reveals that we can meet the unit production cost goal with a certainty of
93%. However, the certainty of meeting our production volume goal (of 36,000 kg or 147
batches) is only 83%.
The dynamic sensitivity charts can provide useful insight for understanding the variation of
the process. They illustrate the impact of the input parameters on the variance (with respect
to the base case) of the final process output, when these parameters are perturbed
simultaneously. This allows us to identify which process parameters have the greatest
contribution to the variance of the process so as to focus the effort for process
improvement.

The sensitivity analysis for Annual Number of Batches is shown in the next figure:

The sensitivity analysis for Unit Production Cost is shown in the next figure:

The duration of the condensation reaction has the greatest impact on the number of batches
and consequently the annual throughput. If the management of the company is seriously
committed to the annual production target, it would be wise to allocate R&D resources to
the optimization of the condensation reaction. In addition we can see that the purchasing
price of quinaldine has the greatest impact on the manufacturing cost of the final product.
Focusing the market research on lower cost suppliers for quinaldine would be advisable.
The variation in the two performance parameters is also affected by the filtration fluxes in
NFD-101. The increase in the filtration fluxes corresponds to a decrease in operation times,
and therefore to an increase of the number of batches and the annual throughput. Decrease
of operation times and also results in a small decrease of the unit production cost.

This simple example from the pharmaceutical industry demonstrates how the combination
of process simulation and risk analysis could facilitate the decision-making process. A
probabilistic estimate is more representative of the real world than a deterministic
approach, thus including variance/uncertainty in the modeling of industrial processes leads
to reliable forecasts or the important production / economic indices and enables
management to consider all possible scenarios (and their probability). The framework
presented combines a deterministic process simulator that provides reliable correlations
between input and output variables through detailed process modeling and a risk analysis
tool which employs Monte-Carlo simulation a practical approach for considering
uncertainty and generating the possible scenarios that need to be accounted for. It is
applicable to complex situations, in terms of process design and parameter interaction,
where simple spreadsheet models are insufficient for analysis. It is an indispensable tool for
recognizing and mitigating the risk factors that determine the project outcome by guiding
the management to the aspects of the process they need to address their focus.

Environmental Example

An environmental example is presented in order to demonstrate the usefulness of the Pro-


Designer COM server to engineering /economic parametric studies, and in order to provide
you with examples of basic VBA scripts for data exchange and report creation. A sample
Excel workbook (ComEx3.xls) is provided along with a sample Pro-Designer simulation
case (ComEx3.epf). Please follow the instructions in Setting Up The Project the first time
you open the excel file.

To find more about the structure of the sample workbook and the available examples
please, see The Excel Workbook for the Environmental Example.

To find more about the specific process file and the sensitivity analysis example
please, see The Process File for the Environmental Example.

The Process File for the Environmental Example

The process file chosen is a variation scenario of the Industrial Water treatment example
(described in the tutorial). This is a typical example that analyzes an industrial wastewater
treatment plant and demonstrates how to track the fate of multiple chemical components
(constituents) in an integrated facility. The influent stream, which is a waste stream from an
industrial process is combined with the sludge return stream (Sludge Recycle) and is sent to
a sequence of two aeration basins (AB-101 and AB-102) for biological oxidation of the
organic material, a clarifier (CL-101) for removing the biomass and thickening, a granular
media filter (GMF-101) for removing remaining particulate components and a belt filter
press (BF-101) for concentrating the waste. The removed water, which contains small
amounts of biomass and dissolved solids, is recycled back to the aeration basin.

Parametric Study Motive:

In water waste treatment processes (whether industrial / municipal) there is very often
variability in the composition of the influent waste stream. In this case the influent
represents the combined waste products of upstream industrial processes that may
themselves have variability, or may not run simultaneously resulting in a variation of the
composition of the total waste stream. Our incentive is to study the impact of this
variability on the economic aspects of the process such as treatment cost as well as on the
environmental properties of the liquid effluent stream as described in Impact of Influent
Variation section.

The Excel Workbook

The ComEx3.xls Excel Workbook for the Environmental Example contains the following
spreadsheets:

Readme: Provides useful information, that enables you to use this workbook in
order to visualize the parametric study, the data exchange examples, and the report
exporting examples.
Parametric Study: This spreadsheet is used to show how variability in certain input
parameters may change the results of the simulation. Follow the instructions for opening
the file and changing the input parameters. See how the plots of the environmental and
economic variables.

Data Exchange Examples: This spreadsheet contains simple data exchange


examples, where you can access the value of several Pro-Designer variables. The use of
several data exchange VBA scripts is illustrated. Follow the instructions on the
worksheet to access several variables.

Reports Examples: This spreadsheet contains examples of using the COM


functionality to export reports.

Visit the Visual Basic Editor interface to navigate through the VBA scripts to add or
modify them according to your needs. Please, see Setting Up The Project for more
information on the Visual Basic Editor interface.

Impact of Influent Variation

The plant was designed for an average inflow of 157,500 kg/hr with a benzene
concentration of 0.636 g/L (100 kg/hr in the influent) and glucose concentration 4.98 g/L
(783 kg/hr in the influent). Benzene is treated with aerobic bio-oxidation but it is also
emitted. Glucose is also treated with aerobic bio-oxidation. Small fluctuations in the
upstream plant operating conditions result in variation of the pollutants concentrations. The
Parametric Study worksheet in the ComEx3.xls Excel workbook demonstrates this analysis. The
scripts for this sheet are included in the VBA module: ParamStudy.

Variation of Benzene in the Influent:

The inflow of benzene was varied from 20 kg/hr (which corresponds to a concentration of
0.1278 g/L in an influent stream of 157,418 kg/hr) to 1620 kg/hr (which corresponds to a
concentration of 10.19 g/L in an influent stream of 158,970 kg/hr) while glucose inflow
was constant at 783 kg/h. As a result the waste treatment cost increases almost linearly with
Benzene concentration.
In addition to the economic effects we can see that the variation of benzene in the inflow
causes variation to the environmental properties of the liquid effluent stream and we can
see here for example that Chemical Oxygen Demand in the effluent stream increases with
increasing benzene concentration.
Variation of Glucose in the Influent

The inflow of glucose was varied from 400 kg/hr (which corresponds to a concentration of
2.54 g/L in an influent stream of 156,115 kg/hr) to 1150 kg/hr (which corresponds to a
concentration of 7.3 g/L in an influent stream of 157,465 kg/hr) while benzene inflow was
constant at 100 kg/h.

Furthermore the Total Organic Carbon in the effluent stream increases linearly with
glugose concentration in influent after a certain a concentration. The TOC starts increasing
significantly with glucose concentration after a concentration of 0.22 g/L which
corresponds to a glucose inflow of 800 kg/hr. Glucose is treated with aerobic bioxidation in
the two reactors which where designed for the average inflow of glucose (783 kg/h ). For
higher glucose concentrations glucose is not completely degraded therefore contributing to
the final TOC.
Custom Report Creation Example

The purpose of this example is first to illustrate how you can use the COM functions to
create a custom report. You can see how you can make use of the COM functions (and
particularly the export methods and the variable data access methods) to create a report that
contains the information /charts /figures of your selection. A sample Excel workbook
(ComEx5.xls) is provided along with a sample Pro-Designer simulation case
(ComEx5.spf). Please follow the instructions in Setting Up The Project the first time you
open the excel file.

The Excel Workbook

The ComEx5.xls Excel Workbook contains the following spreadsheets:

Readme: Provides useful information that enables you to use this workbook in order
to create and export reports and charts. You should read this before proceeding.

Custom Report P1: This spreadsheet is the 1st page of the Custom Report. First
make sure that the information for the directories and file names (highlighted in yellow)
is correct corresponds to your settings. Then click on the Update Custom Report button
to create a custom report. The VBA scripts for this can be found in module
CustomReport.

Economics: This spreadsheet is the 2nd page of the custom report where several
economic parameters are displayed. The relevant VBA scripts can be found in module
Economics.
Material Balance: This spreadsheet is the 3rd page of the custom report where
material balance information is displayed. What is actually displayed here is the stream
summary table, which is linked to the spreadsheet with a data link.

Gantt Charts: This spreadsheet is the 4th page of the custom report. The operations
and equipment Gantt charts are displayed here.

Throughput: This spreadsheet is the 5th page of the custom report. The Throughput
analysis charts (potential / utilization) are displayed here.

Equipment: This spreadsheet is the 6th page of the custom report. The equipment
occupancy chart (potential / utilization) is displayed here.

Visit the Visual Basic Editor interface to navigate through the VBA scripts to add or
modify them according to your needs. Please, see Setting Up The Project for more
information on the Visual Basic Editor interface. For more information on VBA scripts
please, see VBA Sample Scripts.

Report Exporting Example

The purpose of this example is first to illustrate how you can use the COM functions to
create and export reports, that can be generated with the Pro-Designer application. You can
see how you can make user of the COM functions and particularly the report related
methods. A sample Excel workbook (ComEx6.xls) is provided along with a sample Pro-
Designer simulation case (ComEx6.spf). Please follow the instructions in Setting Up The
Project the first time you open the excel file.

The Excel Workbook

The ComEx6.xls Excel Workbook contains the following spreadsheets:

Readme: Provides useful information that enables you to use this workbook in order to

create and export reports and charts.

Reports Examples: This spreadsheet contains examples of using the COM functionality to

export reports by setting certain options, like the export format type. The code for these
examples can be found in the code for this Sheet and in modules GeneralFunctions and
ExportReports.

Visit the Visual Basic Editor interface to navigate through the VBA scripts to add or
modify them according to your needs. Please, see Setting Up The Project for more
information on the Visual Basic Editor interface. For more information on VBA scripts
please, see VBA Sample Scripts.
Object Linking Example

The purpose of this example is first to illustrate how you can use the COM functions to
export various objects (pictures, charts) to picture files or the clipboard, that can be
generated with the Pro-Designer application. You can see how you can make use of the
COM functions and particularly object export related methods. A sample Excel workbook
(ComEx7.xls) is provided along with a sample Pro-Designer simulation case
(ComEx7.spf). Please follow the instructions in Setting Up The Project the first time you
open the excel file.

The Excel Workbook

The ComEx7.xls Excel Workbook contains the following spreadsheets:

Readme: Provides useful information that enables you to use this workbook in order
to create and export reports and charts.

Charts Examples: This spreadsheet contains examples of using the COM


functionality to export several objects (flowsheet pictures, charts, Gantt charts) either to
a metafile or to the Clipboard. In this example the number of batches is exposed to the
user to set were applicable. Also by pressing on the various chart buttons you can export
them to a new worksheet page which is added in the excel workbook. The code for these
examples can be found in the code for this Sheet and in modules
GeneralFunctions, ExportObjectsToFile, and ExportObjectsToClipboard.

Visit the Visual Basic Editor interface to navigate through the VBA scripts to add or
modify them according to your needs. Please, see Setting Up The Project for more
information on the Visual Basic Editor interface. For more information on VBA scripts
please, see VBA Sample Scripts.

Enumerating Example

The purpose of this example is to illustrate how you can make use of the enumerating COM
functions in order to enumerate and retrieve lists of items that are part of a ProDesigner
case file. You will also see how to display the generated lists in the Excel worksheet. A
sample Excel workbook (ComEx8.xls) is provided along with a sample Pro-Designer
simulation case (ComEx8.spf). Please follow the instructions in Setting Up The Project the
first time you open the excel file.

The Excel Workbook

The ComEx8.xls Excel Workbook contains the following spreadsheets:


Readme: Provides useful information that enables you to use this workbook in order
to create and export reports and charts.

Pick File: In this worksheet you pick the ProDesigner Case file by pressing on the
button Pick a File.

Materials: This worksheet contains examples of using the COM functionality to


enumerate over all the Pure Components and Mixtures and create a table of the Raw
Materials and their amount requirements. The code for this example can be found in this
sheet and in the modules GeneralFunctions and Materials.

Streams: This worksheet contains examples of using the COM functionality to


enumerate over all the streams of the flowsheet and create a table that displays the Basic
Stream Types and its Classification. Also a table with the Waste streams and a table
with the Raw Material streams is created with certain of their properties. The code for
this example can be found in this sheet and in the modules GeneralFunctions and
Streams.

Visit the Visual Basic Editor interface to navigate through the VBA scripts to add or
modify them according to your needs. Please, see Setting Up The Project for more
information on the Visual Basic Editor interface. For more information on VBA scripts
please, see VBA Sample Scripts.

Visual C# COM Application


Using the same objects, methods and variables as in VBA one can also create a COM
application using C# programming language to automate Pro-Designer. This however
requires that you have a C# debugger and programming environment such as MS Visual
Studio which includes Visual C#. Familiarity with Visual C# is important for taking full
advantage of the Pro-Designer COM Server, this manual provides the basic initial steps to
begin with Visual C#.

When you start the Visual Studio application you create a new project by selecting File /
New / Project on the main menu and from the dialog that appears you select Visual C# as
your language from the left pane and the Windows Application template from the right.
This will do the necessary work to create the foundation on which your application can be
built on. In order to make C# code to work with the Pro-Designer COM interface, one
should load as in the Visual Basic Editor, the Designer Type Library. This is done by right
clicking on the References properties, and selecting Add Reference as shown in the
following image:
On the dialog that appears you switch to the COM tab and you scroll down and click on the
SuperPro Designer Component Name. Make sure the path of the reference library
(Designer.tlb) is correct, and click on OK. You can now view the Object Browser by
right clicking on the Designer object and selecting View in Object Browser as shown in the
following image:
Once you have completed the above procedure, you may start writing your code and/or
designing your interface. Your code with all your declarations, initializations of objects and
data exchanging with Pro-Designer can be written in the Form1.cs file. The Form1.cs file
can be viewed/edited by right clicking on the Form1.cs file and selecting View Code as
shown in the following image:
A Visual C# example that utilizes the Pro-Designer COM server is included with this
manual. The example can be found in the Pro-Designer installation directory under the
folder /Examples/COM/C#/COMEx1/. The solution file that must be loaded in Visual
Studio is COMEx1.sln.
Description of Specific COM Variables
There are certain variables which are Operation or Equipment Specific. This will give a
detailed description of all those specific variables which can be accessed through the COM
server.

Equipment Specific Variables

Operation Specific Variables

Equipment Specific Variables

In addition to the variables that are general to all operations and can be accessed as
described in Functions for Equipment Variables and Equipment Variables, you can access
variables that are equipment specific. You will use the same functions
(GetEuipVarVal/Val3 or SetEquipOperVarVal/Val3 or GetEquipVarValEx) depending on
the number of arguments required as described in the general case. The list of specific
variables include:

Absorber Variables

Aeration Basin Variables

Aeration Basin (PF) Variables

Air Filter Variables

Air Lift Fermentor Variables

Anaerobic Digester Variables

Anoxic Reactor Variables

Assembler Variables

Baghouse Filter Variables

Basket Centrifuge Variables

Basket Centrifuge (BD) Variables

Bead Mill Variables


Belt Conveyor Variables

Belt Filter Variables

Blending Tank Variables

Blow Molder Variables

Bucket Elevator Variables

Bulk To Discrete Generic Box Variables

Butterfly Valve Variables

Centrifugal Compressor Variables

Centrifugal Extractor Variables

Centrifugal Fan Variables

Centrifugal Pump Variables

Centrifuge Variables

Centritech Centrifuge Variables

Chromatography Column Variables

Clarifier Variables

Cloth Filter Variables

Component Splitter Variables

Condenser Variables

Cone Screw Variables

Cooling Tower Variables

Cyclone Variables

Dead End Filter Variables

Decanter Centrifuge Variables


Decanter Tank Variables

Degasifier Variables

Diafilter Variables

Diaphragm Pump Variables

Differential Extractor Variables

Discrete Bin Variables

Discrete Drum Variables

Discrete Freeze Dryer Variables

Discrete Generic Box Variables

Discrete Mixer Variables

Discrete Splitter Variables

Discrete Storage Rack Variables

Discrete Stroage Tray Variables

Discrete To Bulk Generic Box Variables

Disposable Container Skid Variables

Distillation Column Variables

Double Cone Dryer Variables

Drum Dryer Variables

EBA Chromatography Column Variables

Electric Cooler Variables

Electric Heater Variables

Electrostatic Precipitator Variables

Equalizer Variables
Evaporator Variables

Extruder Variables

Fermentor Variables

Filler Variables

Flat Bottom Tank Variables

Flotation Tank Variables

Flow Distributor Variables

Flow Splitter Variables

Fluid Bed Dryer Variables

Freeze Dryer Variables

Freeze Thaw Module Variables

Fryer Variables

GAC Adsorber Variables

Gas Cyclone Variables

Gasifier Variables

Gate Valve Variables

Gear Pump Variables

GFL Chromatography Column Variables

Globe Valve Variables

Granular Media Filter Variables

Granulator Variables

Grinder Variables

Heat Exchanger Variables


Pasteurizer Variables

Homogenizer Variables

Hopper Variables

Horizontal Tank Variables

HydroCyclone Variables

Incinerator Variables

Injection Molder Variables

INX Column Variables

IP Clarifier Variables

Junction Box Variables

Labeler Variables

Liquids Drum Variables

Membrane Filter Variables

Microfilter Variables

Mixer Variables

Mixer-Settler Extractor Variables

Neutralizer Variables

Nutsche Filter Variables

Oil Separator Variables

Packer Variables

Pasteurizer Variables

PBA Chromatography Column Variables

Plug Flow Reactor Variables


Plate and Frame Filter Variables

Pneumatic Conveyor Variables

Printer Variables

Pump Variables

Receiver Tank Variables

Reverse Osmosis Filter Variables

Rotary Dryer Variables

Rotary Vacuum Filter Variables

Screw Conveyor Variables

Seed Fermentor Variables

Seed Reactor Variables

Shredder Variables

Silo Variables

Sludge Dryer Variables

Solids Bin Variables

Solids Drum Variables

Sphere Dryer Variables

Steam Generator Variables

Stirred Reactor (CSTR) Variables

Stripper Variables

Tablet Coater Variables

Tablet Presser Variables

Tableter Variables
Thickener Variables

Thin Film Evaporator Variables

Throughput Equipment Variables

Tray Dryer Variables

Trickling Filter Variables

Trimmer Variables

Tumble Mixer Variables

Turbine Variables

Ultrafilter Variables

UV Radiator Variables

Valve Variables

Vertical On Legs Tank Variables

Vertical Dryer Variables

Vertical Vessel Variables

Vessel Variables

Wet Air Oxidizer Variables

Operation Specific Variables

In addition to the variables that are general to all operations and can be accessed as
described in Functions for Operation Variables and Operation Variables, you can access
variables that are operation specific. You will use the same functions
(GetOperVarVal/Val2/Val3 or SetOperVarVal/Val2/Val3) depending on the number of
arguments required as described in the general case. A list of operation specific variables is
available for:

Batch Concentration (Membrane Filtration) Operation Variables

Batch Stoichiometric Fermentation Variables

Batch Stoichiometric Reaction Variables


Batch Equilibrium Reaction Variables

Batch Kinetic Reaction Variables

Batch Vaporization Rigorous Variables

Charge Operation Variables

Clean-In-Place (CIP) Operation Variables

Cloth Filtration Operation Variables

Dead-End Filtration Operation Variables

Degasification Variables

Cake Wash Operation Variables

Centrifugation Operation Variables

Continuous Concentration (Membrane Filtration) Operation Variables

Continuous Crystallization Variables

Continuous Distillation Variables

Flow Splitting (two-way) Operation Variables

Continuous Equilibrium Reaction Variables

Continuous Stoichiometric Fermentation Variables

Continuous Stoichiometric Reaction Variables

Component Splitting (two-way) Operation Variables

Column Elute Operation Variables

Column Regeneration (Detailed) Variables

Column Wash Operation Variables

Column Wash (Detailed) Variables

Diafiltration Operation Variables


EBA Column Loading Operation Variables

Evaporation Operation Variables

Fermentation Operation Variables

Fuel Cell Power Generation Operation Variables

Flow Splitting (two-way) Operation Variables

Generic Box Discrete Pass Through with Separation Variables

GFL Column Loading Operation Variables

Heat Sterilization Variables

Material Wash Operation Variables

MA Elute Variables

MA Regeneration Variables

MA Wash Variables

PBA Column Loading Operation Variables

Perfusion Fermentation Variables

PF Stoichiometric Reaction Variables

PF Kinetic Reaction Variables

Pasteurization Operation Variables

Transfer Operation Variables

Transfer In Variables

Transfer Out Operation Variables

Transport Operation Variables

Pull In Operation Variables

Stoichiometric Reaction (in Nutsche) Variables


Vessel Operation Variables

Liquids Pumping Operation Variables

Gaseous Pumping Operation Variables

Sludge Drying Operation Variables

Mixture Prep Operation Variables

Extrusion Operation Variables

Вам также может понравиться