Before a user-added unit operation can be used, the user must provide access information so PRO/II can find the data initialization (INI) file and the executable DLL. This is a simple procedure that involves adding a single line of plain text to PRO/II’s user-added registry file.
The name of the user-added registry file is P2UasReg.ini. Assuming a typical installation of PRO/II (installed on the "C:" drive of the computer in the default directory), the full path to it is:
C:\My Documents\Simsci\proiixx\system\P2UASReg.ini (xx in proiixx represents the version number)
This registry file is divided into different sections based upon classes of User-Added subroutines. The section that begins with the token [UAUOP] is intended to contain all user-added unit operations interfaced by end-users or independent developers (not affiliated with Simsci). Be sure to register the unit operation only in the [UAUOP] section, or it may not function properly.
Each registered unit operation occupies exactly one line in the [UAUOP] section of the registry file. Each registry line consists of the following information:
IdNo Unit operation sequence number. PRO/II uses this number to sequence user-added unit operations. This number must be unique among all IdNo’s listed in the [UAUOP] section. Additionally, the value of IdNo must be in the range 1 to 9999 (inclusive). Zero, negative values, and values greater than 9999 are not allowed. The numbers are not required to be in ascending order, but that is preferred. This entry is required.
UATYPE A unique identifier for the unit operation. PRO/II uses this to uniquely identify the unit operation. No other entry in the [UAUOP] section is allowed to use this identifier. It must agree exactly with the UATYPE in the [Access Data] section of the INI file (see entry 3, below). This should always be enclosed in full quotation marks (") in case the token contains any spaces. The text is not case sensitive, so "MyUaUop" and "MYUAUOP" are treated identically. This entry is required.
INI File Name This is the full name of the initialization file for this unit operation. The INI file must be stored in the PRO/II system directory. In a typical installation, the path to the INI file is C:\My DOcuments\Simsci\proiixx\system\FileName.ini where FileName represents the actual name of the INI file. The ".INI" suffix is required. (xx in proiixx represents the version number.)
Help File Name (Not yet supported.) A developer may choose to create a help project for the unit operation. If so, enter the full name of the help file., including the suffix. Usually these files are stored in the PRO/II help directory. If the default path was used during PRO/II installation,this path is: C:\My Documents\Simsci\hlp\. If no help file is provided, enter a tilde (~) as a placeholder.
Help context String (Not yet supported.) This is the ID of a help topic in the help file. Enter a tilde as a placeholder if there is no help file. This topic is linked to the Overview button in the main data entry window of the unit operation when it is laid down on the PFD.
These are the rules for working with the P2UasReg.ini file:
Use only a plain-text editor such as NotePad. Do not use a word processor (such as WordPad, Word, or WordPerfect) since they formatting symbols in the text.
Enter data for all 5 entries on the line. Enter a tilde (~) as a placeholder for missing data such as help file name or help context string.
None of the data is case sensitive, so using upper or lower characters in any combination is allowed.
Save the file in the same place from which it was opened; i.e., the Pro/II system directory.
When saving the file, do not alter the file name or move the file. The name must remain P2UasReg.ini.
Example:
This example illustrates registering a unit operation in the [UAUOP] section of the P2UasReg.ini file. For this example, make the following assumptions:
PRO/II was installed using the default directory paths.
The executable DLL of the unit operation is named MyUaUop.dll and has been installed in the directory C:\My Documents\SIMSCI\ProIIxx\USER\UAS\. (xx in proiixx represents the version number)
The "INI" file for this unit operation is named myuauop.ini and is installed in C:\SIMSCI\Proiixx\System\.
Here are the steps needed to register the unit operation with PRO/II.
Using NotePad, choose the File->Open menu item and navigate to C:\Simsci\Proiixx\PROII\system\. (xx in proiixx represents the version number) Highlight file P2uasreg.ini and click OK to open it.
Scroll down the file and find the token [UAUOP]. Inspect all the entries in the [UAUOP] section to find an unused IdNo, and ensure no UATYPE ID’s match "MYUAUOP".
In this case, there are no entries in the [UAUOP] section, so any number between 1 and 9999 may be used as the IdNo. For simplicity, assume 1 will be used for the IdNo. Also, the token "MYUAUOP" is not in use, so it is available to be used.
Start a new line below the comment lines under the [UAUOP] token, and enter 1 under the "IdNo" heading.
Add one or more spaces and enter "MYUAUOP" under the "UATYPE" heading. Be sure to enclose it in (full) quotation marks.
Add one or more spaces and enter myuauop.ini under the "INI File Name" heading. (If there were any spaces in this name, it would need to be enclosed in (full) quotation marks.)
Space over so the cursor is under the "help File Name" heading. Since there is no help file, enter a tilde ~ as a place holder. Move the cursor under the "Help Context String" heading and add another tilde as another placeholder.
Press the Enter key to insert a line feed/carriage return at the end of the line.
Choose File->Save from Notebook’s File menu; then click the OK button to save the changes. Choose File->Exit to close Notepad.
The completed line entry should be very similar to the following figure.
; ===========================================================================
; 3rd party User-Added Unit Operations must be entered in the [UAUOP] section below
[UAUOP]
; IdNo UATYPE (from UAS ini file) INI File Name Help File Name Help Context String
; ------ --------------------------------------- ------------------- ---------------------- -----------------------------
1 "MYUAUOP" myuauop.ini ~ ~
Syntax Notes:
Any text to the right of a semicolon (;) is treated as a comment and ignored. Lines starting with a semicolon are comment lines and completely ignored.
Blank space is treated as a delimiter between entries. Contiguous multiple spaces are treated as single space.
Developers should avoid blank lines in the registry file.
Developers must not alter any of the Simsci reserved keywords, specified in different sections of the file.
Stepwise procedure to add new UAUOP
Registering a new UAUOP with PRO/II
Hints for defining new ini for the new UAUOP
New Interface functions for managing Component, Stream, and unit op data