============================================================================ Saturate Extension Version 1.

3 This Automation application has been created by Hyprotech Technical Support as a n example of what can be achieved through the object architecture of HYSYS. The application is provided for academic purposes only and as such is not part of H yprotech s QA procedures. We strongly encourage users of this facility to check r esults carefully and use the facility accordingly. Please report any problems e ncountered through the normal support channel at support@hyprotech.com. ============================================================================ Installation notes 1. To install this extension, unzip the files, and then the extension .dll will have to be registered by the user following the directions below (see #1 below). 2. Saturate 1.3 has been tested in Windows NT 4.0 with Service Pack 6, and Windo ws 2000. 3. Saturate 1.3 is designed to run in HYSYS Build 3797. Note that running Satura te 1.2 in older versions of HYSYS may result in unexpected behavior. This extension has been te sted in Hysys 2.2 (build 3797) and Hysys 2.4 (build 3868). 3. If your operating system is W95, run the OLEUPDT.EXE installation program tha t is located in the directory of the same name, included in the HYSYS CD. Do this before registe ring the extension. Troubleshooting tips These troubleshooting tips are written assuming that the proper MSVBVM .dll file is loaded on the users computer in the system32 directory. Some extensions use MSVBVM50.dll and some use MSVBVM60.dll. Both should be downloaded off the website unless there are versio ns already loaded on the users computer. Do a file search before downloading them and if y ou have a later version of the .dll's than the ones on the Hyprotech site, you might not w ant to overwrite them. The extensions were only tested in Windows NT and Windows 2000. This does not preclude them form working in other versions however. 1.) How do I register an extension I download from the web site? Ans: There are several ways to do this once the files are dowloaded on to your c omputer and unzipped. (The following procedure is only required if the extension does not have a Setup.exe file). In HYSYS Go to Tools Preferences Extensions tab. Press the Register Extension bu tton. Browse to find the file folder where you have saved the downloaded extension. Cho ose the .dll file and press OK. A message will come up saying that the file was successfu lly registered. In Windows Explorer Find the folder where you have downloaded and unzipped the extension. C

dll is in the directory your Preferences are pointing t o. Whether registering the EDF or DLL file. Check in Preferenc es Extensions and ensure that the . Your extension should be there. the procedure is the same: 1.dll file and physically drag it with your mouse over the regextn.xxx Where. You might have to close the prog ram and open it up again.exe file is in your HYSYS root directory and chec k that all files were downloaded and unzipped properly. 5. HYSYS will re-register your extensions automatically when you move from a lower to .) Open a DOS windows and type the following: C:\HYSYS\ExtSDK\RegExtn.exe file th at is included in the HYSYS root directory (same directory as HYSYS.) Register the extension definition file (EDF) which allows the extensio n to be run interactively using Visual Basic b. You shouldn't need to re-boot your computer.exe). 3. Press t he radio button for Extension operations.) My case from an older build of HYSYS contains extensions and when I open it in a new version of HYSYS I get load errors. Sometimes HYSYS needs to be refreshed. xxx is the EDF or DLL extension NOTE: This assumes that HYSYS located is in the C:\HYSYS directory and tha t the HYSYS Extension SDK is installed.exe [Path][FileName].) What happens if the registration is not successful? This error should not come up for any of the extensions you download off the website. Check that the regextn. Highl ight it and press Ok.) Register the compiled extension dynamic link library (DLL) file which integrates the extension into HYSYS.hoose the . You should g et a message that the registration was successful. 2. 4.) How do I add an extension operation to my HYSYS simulation? Go to Flowsheet Add Operation in HYSYS. A window will come up. [Path] is the path to the extension file [FileName] is the name of the extension file. In MS DOS a. if you still get this e rror contact Hyprotech technical support.) I've registered my extension but I don't see it in the Extension Operations list under Flowsheet Add Operation.

Check that the . you r reaction extension will appear in the list.cls suff ix). This will bring up the debug wi ndow.dll is not on a network directory that you cannot access (due to permissions or your network is down etc. Other things to try: Move the .dll files are in the Windows sy stem32 directory.) I've thought of everything and I still get load errors.dll and MSVBVM50.) How can I interactively run an extension? Ans: Use the following procedure: 1.) Right-click on an appropriate line of code and select Toggle Breakpoin t. select Project fro m the View menu and double-click on the class module (the file will have the . Once you are complete with debugging and want the reaction extension to be a vailable. If everything is working properly.) Load HYSYS and add a reaction. 2. 8. the TASC and Pipesys extensions require a proper license for th em to run.dll to the "C:" drive and re-register it. However. b. use the following sequence: a. During this time. 3. See #4 above. For example. 6.) Load HYSYS and add a reaction. Check that the MSVBVM60. Check that the .) Register the DLL file. This will display a warning message which you can ignore. c.) Compile the reaction extension into a DLL. The line will . debug.) Check that the extension does not require a bit to be set on your HYSYS key. etc. Register the . c.) For users who are writing their own extensions for HYSYS (this question uses the example of a reaction extension): 7.) Register the extension definition file (EDF).) Register the EDF file.dll from MS-DOS using procedure 1 c.) Press the Run button in Visual Basic.) Load the extension Visual Basic project (VBP) file. a warning message will be displayed since no DLL was regis tered. you r reaction extension will appear in the list. b. If you remove the old HYSYS program before installing the new version then you'll probably have to re-register all extensions.higher build.dll is in the same location as the location in Preferenc es Extensions. you can switch t o Visual Basic and add breakpoints to check variable values. If everything is working properly. If you want to interactively run and debug the reaction extension. use the following sequence: a.) What is the difference between registering the EDF instead of the DLL? Ans: Registering the EDF allows you to interactively run and debug the extension using Visual Basic.

. The code will be paused at the breakpoint. NOTE: HYSYS will call the extension three times (one Forgetting pass and two Execute passes). Use t he F8 key to step through the code line-by-line and F5 to stop stepping through the code and run the remainder non-interactively. 5. HYSYS will be inactive while the extension is being stepped through. you can s tep through the code line-by-line interactively while the extension is running. it will move in front of HYSYS. When Visual Basic reaches the breakpoint in the extension.TemperatureValue and pressing enter will return the temperature of the stream named StreamName in HYSYS interna l units (°C). While stepping through the code you can interactively view and set val ues in the Debug window.) Press the Start button on the Visual Basic toolbar. For example. The Debug window will appear. typing ?StreamName. 6.turn red.) Load a HYSYS simulation case and install the extension by pressing F12 and doubleclicking on name of the extension in the unit operation list-box. 4.) Select extension attachments and parameters as appropriate to make the extension calculate. See #2 and #3 above. indicating a breakpoint at which the execution of the code w ill be paused.

Sign up to vote on this title
UsefulNot useful