Specifying Physical Quantity Units in Tables

This Enum (COMPQUnits) is used for specifying the units used in excel tables. It is used with functions Set/ GetOptionsForEquipmentContentsTable(equipName As String, VarID As VarID, val), Set/ GetOptionsForStreamSummaryTable(VarID As VarID, val), Set/ GetOptionsForProcOperationSequenceTable(procName As String, VarID As VarID, val).

So depending on the type Units type you are using the following enum values can be used:

Time Units:

 

COMPQUnits

Units

s_PQU

seconds

min_PQU

minutes

h_PQU

hours

day_PQU

days

wk_PQU

weeks

mo_PQU

months

yr_PQU

year

Volume Units:

 

COMPQUnits

Units

mm3_PQU

mm3

cm3_PQU

cm3

mL_PQU

mL

L_PQU

L

m3_PQU

m3

ft3_PQU

ft3

yd3_PQU

yd3

gal_PQU

gal

kgal_PQU

kgal

Mgal_PQU

Mgal

Density/Concentration Units:

 

COMPQUnits

Units

microg_per_L_PQU

micro-g/L

mg_per_L_PQU

mg/L

mg_per_mL_PQU

mg/mL

kg_per_m3_PQU

kg/m3

g_per_cm3_PQU

g/cm3

lb_per_in3_PQU

lb/in3

lb_per_ft3_PQU   

lb/ft3

lb_per_gal_PQU   

lb/gal

ozMassAvdp_per_gal_PQU   

oz/gal

ozMassTroy_per_gal_PQU   

oz(troy)/gal

mmol_per_L_PQU

mmol/L

micromol_per_L_PQU

micro-mol/L

mol_per_L_PQU

mol/L

kmol_per_L_PQU

kmol/L

lbmol_per_gal_PQU

lbmol/gal

Temperature Units:

 

COMPQUnits

Units

degC_PQU

oC

degK_PQU

K

degF_PQU

oF

degR_PQU

oR

Pressure Units:

 

COMPQUnits

Units

cmH2O_PQU   

cmH2O

mmHg_PQU

mmHg

Pa_PQU   

Pa

kPa_PQU   

kPa

bar_PQU   

bar

atm_PQU   

atm

inH2O_PQU   

inH2O

inHg_PQU   

inHg

psi_PQU   

psi

Mass Units:

 

COMPQUnits

Units

mg_PQU

mg

g_PQU

g

kg_PQU

kg

MT_PQU

MT

ozMassAvdp_PQU

oz(avdp)

ozMassTroy_PQU

oz(troy)

lb_PQU

lb

ton_PQU

ton

kmol_PQU

kmol

mol_PQU

mol

lbmol_PQU

lbmol

 

Heat CapacityUnits:

 

COMPQUnits

Units

J_per_kg_per_degK_PQU

J/kg-K

kJ_per_kg_per_degK_PQU

kJ/kg-K

cal_per_g_per_degC_PQU

cal/g-oC

kcal_per_g_per_degC_PQU

kcal/g-oC

btu_per_lb_per_degF_PQU

btu/lb-oF

Fraction Units:

 

COMPQUnits

Units

massFrac_PQU

mass frac

massPerc_PQU

mass %

moleFrac_PQU

mol frac

molePerc_PQU

mol %

Example 1: To change the temperature units in the Stream Summary Table to oF you may use the following code:

Sub SetTemperatureUnits()

  Dim var1 As Variant

  Dim superProDoc As Designer.Document

 

  Set superProApp = New Designer.Application

  Set superProDoc = superProApp.OpenDoc("spdFileName")

  var1 = CLng(degF_PQU)   ‘oF

   SuperProDoc.SetOptionsForStreamSummaryTable  temperatureUnits_VID, var1

End Sub

 

Example 2: To change the time units in the Procedure Activity Overview Table of a procedure to hours (hr) you can use the following code (you must also specify a procedure name):

Sub SetTimeUnits()

  Dim var1 As Variant

  Dim procName As String

  Dim superProDoc As Designer.Document

 

  Set superProApp = New Designer.Application

  Set superProDoc = superProApp.OpenDoc("spdFileName")

  ProcName = CStr("P-5")

  var1 = CLng(h_PQU)   ‘ hr

   SuperProDoc.SetOptionsForProcOperationSequenceTable  procName, startTimeUnits_VID, var1

End Sub

 

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 Name

sourceStreamName_VID

String

Initialize Total Mass Flow

bInitTotalMassFlow_VID

Boolean

Total Mass Flow Factor

totalFlowFactor_VID

Double

Initialize Composition

bInitComposition_VID

Boolean

Initialize Density / Thermo Data

bInitDensity_VID

Boolean

Initialize Temperature

bInitTemperature_VID

Boolean

Initialize Pressure

bInitPressure_VID

Boolean

Initialize Discrete Entity Data

bInitEntityData_VID

Boolean

Before solving M&E balances auto initialization Mode

solveAutoInitMode_VID

Long

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

(Equipment only)

withDefault_SIM

2

Auto initialize from other source

fromSource_SIM

3

Initialize from own contents

(Equipment only)

fromSelf_SIM

4

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 container 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

ASection

section_CID

A Section of the Main Branch

mainBranchSection_CID

A Stock Mixture

stockMix_CID

A Consumable Category

consumableCategory_CID

An Auxiliary Equipment Type

auxEquipType_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_LID

Storage Units

storageUnit_LID

Consumable Category

consumableCategory_LID

Auxiliary Equipment

auxEquip_LID

Auxiliary Equipment Type

auxEquipType_LID

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.