Export and Import To and From Excel®
With a few clicks of the mouse, ProMax can export or import individual values to and from an embedded Microsoft® Excel workbook. This allows the Excel Solver and other macros in Excel to control values within a ProMax project. The possibilities of this feature include:
- Using Excel to create a simple user interface to ProMax.
- Performing calculations in Excel on ProMax data.
- Using the Excel Solver to optimize process variables.
- Moving data in bulk to and from ProMax.
To accomplish this task, add an embedded Excel workbook in your ProMax project and use the right-mouse click context menu on the property in the project viewer to create the import or export link. This new workbook will be saved within the ProMax .pmx file the next time project is saved. Note that multiple Excel workbooks may be added to a ProMax project, each containing multiple worksheets.
BR&E Scenario Tester
ProMax Scenario Tester is an add-in for Microsoft Excel (2000 or greater) that facilitates the solving of ProMax projects (running in Visio®) with various conditions. For example:
- Perturbing inlet conditions and compositions
- Adjusting equipment specifications
- Simulating historic plant data
Compatible with ProMax 1.1 (build 1.1.5115.0) and ProMax 1.2 (build 1.2.5273.0), the ProMax Scenario Tester add-in allows most user-specified data in a ProMax project to be altered item-by-item and solved in batch mode. Each solve cycle transfers user-selected parameters to and from an Excel workbook, either stand-alone or embedded in ProMax, until the required sets have been run. Simply draw up your flowsheets in ProMax, enter initial conditions, and then execute a variety of scenarios in a batch mode style from within Excel.
BR&E Property Stencil
ProMax Property Stencil is a Visio shape stencil designed to add user definable functionality to ProMax 1.2 or later. This self-contained stencil augments ProMax’s standard Callout or Property Table and adds the ability to embed and share VBScript based calculations. These calculations, accompanied by user-defined text, are displayed directly on the flowsheet and may be placed back into the stencil for use in other projects. Property stencil data is sharable between shapes, embedded Excel workbooks, and ProMax objects within a project (with some restrictions).
The Property stencil ships with four basic shapes and several derived shapes as examples. Create your own custom calculation from the basic shapes, modify an existing example, or contact BR&E with any reasonable requests for additional shapes.
Use VBA to automate ProMax
Nearly every aspect of ProMax is accessible via VBA, the programming language that ships with Microsoft Office products. Automation of ProMax via this feature allows a vast amount of customization but does require some knowledge of Visual Basic and the ProMax object model. Both the Scenario Tester and the Property Stencil currently interact with ProMax using this feature. Other applications of this advanced ProMax feature are:
- ProMax units conversion inside another program
- An automated Excel workbook using ProMax to handle complex calculations
- Custom applications with simple user interfaces used to save engineering time
- Automated simulations using text file inputs
- Using ProMax with live data from gas plants
- Simulations based on data provided real-time from controls
The opportunities for ProMax's extensibility are substantial. If you have any ideas that may interest BR&E or questions about ProMax’s COM Object Model, please contact BR&E.