Adding a topwork to a valve spec
If you want a particular topworks type always placed with a specific valve type, you can define the topworks type by assigning the topwork’s class to the TOPWORKS_CLASS keyword in the valve’s class record in CLASS.INI. For example, if you always want the handwheel topwork placed with a ball valve, you can assign AT_TOPWORKS_HANDWHEEL to the TOPWORKS_CLASS keyword to the desired valve class records in CLASS.INI.
In this instance, when you place a valve with the TOPWORKS_CLASS keyword defined, the system will not display the topworks selection dialog, but will still display the defined topwork’s parameter dialog to enable you to modify the defaults. As stated previously, the defaults will be read from the spec if they are defined, otherwise, they will be read from the TOPWORKS.INI file.
As example AT_TOPWORKS_GEAROPERATOR class will be used. It is recommended that all files be copied prior to modification and the original be kept as a backup.
It is possible to define the topwork placed with a valve type in the valve spec record. To use particular topworks type with a specific valve type, define the topworks type in the Operator field of the valve’s specification record. By Default for Gear Operator only Dist A (HANDWL_LEN in Specification) and Diam C (HANDWL_OD in Specification) can be read from spec.
To read additional parametric variables following modifications should be done:Edit topfunct.ebs (C:\Program Files (x86)\Bentley\Plant V8i\Modules\Base\common).Define additional variable in Topworks_inputGearOperatorDialog function that is used to get parametric variables from Valve Specification for Gear Operator.Next, modify script to read additional values from specification. Edit required Catalog , using Catalog Editor, and add additional fields to valve table that contains required valve. Please make sure that new Field Type is Number and Filed Size is Double.For "Dist B" field in Gera operator dialog add ANDWL_LEN2, for "Dist D" field - HANDWL_LEN3, and for "Offset E" field HANDWL_OFFS. Define values and re-build catalog and then specification.
Copy of the topfunct.ebs file with above changes: topfunct.zip