How to create a custom standard part

About

The -BMHARDWARE command can be used to create custom standard parts of several categories, for example: Pipe, Cross, Tee, etc. It has the option create Custom that allows to select .TXT file(s). These files should contain the following parts:

  1. Mandatory creation parameters
  2. Optional creation parameters
  3. Configuration table
Let's describe these parts one by one, but first, some general rules:
  • Lines which start from semicolon will be ignored.
  • All lines with creation parameters should have the following signature:
    PARAMETER_NAME: "parameter_value"

Mandatory creation parameters

Mandatory creation parameters are parameters without which part just will not be created. Currently, there are the following mandatory parameters:
  • NAME: Name of the created part.
  • CATEGORY: Category of the created part (supported categories will be listed below, english names must be used).
  • PATH: The path to the created part in the Library panel.
    Note: Folders can be separated by semicolon. For example, the value "Piping;Elbows" means that part will be created in the folder Standard Parts → Piping → Elbows → the value of the STANDARD creation parameter.
  • STANDARD: The standard of the created part, for example:ASME, ANSI, DIN, ISO, etc. (families of standards), and not ASME B16.5, DIN EN 1092-1, etc. (particular standards).
  • DESCRIPTION: Description of the created part.

Optional creation parameters

The following creation parameters can be omitted:
  • EXPOSED_PARAMETERS: The parameters in the configuration table that will be accessible to users of the given parts.
    Note: The parameters should be separated by spaces.
  • INITIAL_VALUE: The key value from the table that will be used when the part is dragged from the library.
    Note: If this parameter is omitted, then the first line of the table will be used as the initial value.
  • MATERIAL: The material of the created part.
    Note: Only materials from the material library can be used.
  • CUSTOM_PARAMETERS: The parameters that can have any value and cannot be determined by the table (for example length of pipe).
  • KEY_PARAMETER: The parameter that will be used as key of the parameter table.
    Note: If this parameter is omitted, then the first column will be used as the key parameter.
  • LENGTH_MEASUREMENT_TYPE_PARAMETERS, AREA_MEASUREMENT_TYPE_PARAMETERS, VOLUME_MEASUREMENT_TYPE_PARAMETERS, UNKNOWN_MEASUREMENT_TYPE_PARAMETERS: The parameters that will have the appropriate type. For example, it will be changed in length/area/volume when a part is inserted into documents with other units. Length type is by default.

Configuration table

The configuration table also has mandatory and optional parameters. The mandatory configuration parameters are the following:
  • Geometrical parameters: These parameters determine the geometry of the part and differ for different categories of parts. The full list of such parameters for each category will be described below.
  • Key parameter: This parameter should unequivocally determine the part configuration.
  • Unit parameter: Determines the units in which the part will be created. It can have "IN" – inch and "MM" – millimeters values.

Also, there can be any number of other parameters.

Note: Some general rules:
  • String parameters should be inside quotation marks: "value".
  • If quotation marks are part of the parameter value symbol, the symbol \ should be placed before symbol ". For example:
    "1/2\" X 1/2\" SCH 5"
    will be recognized as 1/2" X 1/2" SCH 5.

How to create a file to create a standard part

The ordinary way to create a file to create a standard part is the following:
  1. Create the table using the values from standards, which will contain key values and geometrical parameters. Add column with units and custom parameters columns if needed.
  2. Convert the table to text format (for example to .CSV). Space should be used as separator, and text values should be placed inside double quotation mark (").
  3. Copy and paste the content of this file into a .TXT file, or even change extension of this .CSV file to .TXT.
  4. Add all mandatory creation parameters and, if needed, optional parameters to the beginning of this .TXT file.
  5. Your file is ready to use.

Creation of custom standard part from existing TXT file

After creating your .TXT file, you need to do following:
  1. In any drawing, run the -BMHARDWARE command and choose the option create Custom.
  2. In the Select configuration table file dialog box, select your created .TXT file (or files).
  3. The command will create a new standard part. For example:
    • It will open a new drawing with proper units.
    • It will create components with properties according to the .TXT file.
    • It will save the standard part in proper place.
    • It will create thumbnails for the library.
Example of a possible .TXT file to create a sample elbow:
; Mandatory creation parameters
 
NAME: "Sample elbow"
CATEGORY: "Elbow"
PATH: "Piping;Elbows"
STANDARD: "Sample standard"
DESCRIPTION: "Sample description"
 
; Optional creation parameters
 
EXPOSED_PARAMETERS: "PartNumber" "Size" "OuterDiameter" "Thickness" "Schedule"
INITIAL_VALUE: "1/2\" X 0.065\" (SCH 5S)"
LENGTH_MEASUREMENT_TYPE_PARAMETERS: "OuterDiameter" "Thickness"
MATERIAL: "Steel"
 
; other possible optional parameters
; CUSTOM_PARAMETERS:
; KEY_PARAMETER:
; UNKNOWN_MEASUREMENT_TYPE_PARAMETERS:
; AREA_MEASUREMENT_TYPE_PARAMETERS:
; VOLUME_MEASUREMENT_TYPE_PARAMETERS:
 
; table
 
"PartNumber"                   "Size"      "UNIT"     "OuterDiameter"     "Thickness"     "Schedule"     "B"      "DEG"
"1/2\" X 0.065\" (SCH 5)"      "1/2\""     "IN"       0.84                0.065           "SCH 5"        0.62     45.0
"1/2\" X 0.065\" (SCH 5S)"     "1/2\""     "IN"       0.84                0.065           "SCH 5S"       0.62     45.0
"1/2\" X 0.083\" (SCH 10)"     "1/2\""     "IN"       0.84                0.083           "SCH 10"       0.62     45.0

Transferring of models with custom standard parts

Currently, data for the custom standard parts is stored separately from the drawing in which they are inserted. In order for another user to be able to work with models with custom standard parts, he should also have the appropriate .TXT file from which they were created. This user should perform all the steps from Creation of custom standard part from existing TXT file.

Parts categories and geometrical parameters

Pipe
Category: "Pipe"
All parameters are mandatory:
  • OuterDiameter: Outer diameter.
  • Thickness: Thickness.
  • VAR_LG: Initial length.
Cross and tee
CATEGORY: "Cross"
CATEGORY: "Tee"
All parameters are mandatory:
  • OuterDiameter: Run outer diameter.
  • OuterDiameter_2: Outlet outer diameter.
  • C: Run center to end distance.
  • M: Outlet center to end distance.
  • Thickness: Run thickness.
  • Thickness_2: Outlet thickness.
Reducer and eccentric reducer
CATEGORY: "Reducer"
CATEGORY: "Eccentric reducer"
Mandatory parameters:
  • OuterDiameter: Outer diameter of the 1st end.
  • OuterDiameter_2: Outer diameter of the 2nd end.
  • Thickness: Wall thickness of the 1st end.
  • Thickness_2: Wall thickness of the 2nd end.
  • L: Overall length of the reducer.
Optional parameters:
  • THKNS3: Wall thickness of the conical part, not for eccentric reducer. The default value is maximum of Thickness and Thickness_2.
  • L1: Length of the 1st end’s cylindrical part. The default value is 0.25 × L.
  • L2: Length of the 2nd end’s cylindrical part. The default value is 0.25 × L.
Elbow
CATEGORY: "Elbow"
All parameters are mandatory:
  • OuterDiameter: Outer diameter.
  • Thickness: Thickness.
  • B: Center to end distance.
  • DEG: Angle in degrees.
Flange
CATEGORY: "Flange"
Mandatory parameters:
  • OD: Flange outer diameter.
  • ID: Flange inner (bore) diameter.
    Note: If the flange type is BLIND, it must be omitted, or its value must be 0.
  • FLANGE_THK: Flange thickness. It does not include face height.
  • BoltCircleDiameter: Holes’ centers circle diameter.
  • BoltsNumber:Number of holes.
  • HOLE_D: Hole diameter.
  • BoltDiameter: Bolt diameter.
  • OuterDiameter: Pipe outer diameter.
  • GasketThickness: Gasket thickness.
    Note: If the face type is ASME_RING_JOINT, it must be omitted.
  • DistanceBetweenFlanges: Distance between flanges.
    Note: If the face type is not ASME_RING_JOINT, it must be omitted.
  • FLANGE_TYPE – flange type
    The value must be the same for all rows. The following types are supported.
    BLIND – no bore
    No hub’s raised part. No pipe connection.
    PLATE – no hub’s raised part
    The pipe is inserted into the bore.
    CYL_RAISE_HUB_PIPE_INS_INTO_BORE – the hub has a cylindrical raised part
    The pipe is inserted into the bore.

    Mandatory parameters: HUB_OD, HUB_L.

    CYL_RAISE_HUB_PIPE_CONN_TO_HUB – the hub has a cylindrical raised part
    The pipe is connected to the hub.

    Mandatory parameters: HUB_OD, HUB_L.

    CYL_RAISE_HUB_WITH_SOCKET – the hub has a cylindrical raised part with a socket
    The pipe is inserted into the socket.

    Mandatory parameters: HUB_OD, HUB_L, SOCKET_OD, SOCKET_DEPTH.

    CON_RAISE_HUB_PIPE_INS_INTO_BORE BORE – the hub has a conical raised part
    The pipe is inserted into the bore.

    Mandatory parameters: HUB_RAISE_BOTTOM_OD, HUB_RAISE_TOP_OD, HUB_L.

    CON_RAISE_HUB_PIPE_CONN_TO_HUB – the hub has a conical raised part
    The pipe is connected to the hub.

    Mandatory parameters: HUB_RAISE_BOTTOM_OD, HUB_RAISE_TOP_OD, HUB_L.

    CON_CYL_RAISE_HUB_PIPE_CONN_TO_HUB – the hub has a raised part
    It consists of the conical part at the bottom and the cylindrical part at the top. The pipe is connected to the hub.

    Mandatory parameters: HUB_OD, HUB_L, HUB_CYL_PART_OD, HUB_CYL_PART_L.

  • FACE_TYPE – face type
    The value must be the same for all rows. The following types are supported.
    Note: The red line shows the face from which GasketThickness (or DistanceBetweenFlanges for ASME_RING_JOINT) is measured along Z-axis.
    FLAT – flat face
    RAISED

    Mandatory parameters: RAISE_OD, RAISE_H.

    TONGUE

    Mandatory parameters: TONGUE_ID, TONGUE_OD, TONGUE_H, FF_DEPTH.

    FEMALE

    Mandatory parameters: TONGUE_ID, TONGUE_OD, TONGUE_H, FF_DEPTH.

    FLAT_WITH_GROOVE

    Mandatory parameters: GROOVE_ID, GROOVE_OD, GROOVE_DEPTH.

    GROOVE

    Mandatory parameters: RAISE_OD, RAISE_H, GROOVE_ID, GROOVE_OD.

    ASME_RING_JOINT

    Mandatory parameters: RAISE_OD, RAISE_H, GROOVE_CENTER_D, GROOVE_TOP_WIDTH.

    DIN_O-RING_GROOVE

    Mandatory parameters: RAISE_OD, RAISE_H, GROOVE_OD, GROOVE_DEPTH, GROOVE_SLOPE_ANGLE.

Optional parameters:
  • Thickness: Pipe thickness.

  • Gap:
    • If the pipe is inserted into the bore, it is the distance along Z-axis from the highest point of the bore to the pipe connection point.
    • If the pipe is inserted into the socket, it is the distance along Z-axis from the bottom of the socket to the pipe connection point.
      Note: The default value is 0. For other pipe connection types, it must be omitted.
  • IS_CUSTOM_PIPE_THK_ALLOWED:
    • If the value is not 0, custom Thickness values are supported.
    • If the value is 0, custom Thickness values are not supported.
      Note: At this moment, it works only for the flange type CON_RAISE_HUB_PIPE_CONN_TO_HUB if the parameter HUB_RAISE_TOP_OD corresponds to OuterDiameter. The default value is 0.
Gasket
CATEGORY: "Gasket"
MULTIRING

This is a type of gasket consisting of one or more subsequent rings. Rings have rectangular profile. Ring thickness H (i), bounding diameters D(i-1) and D(i).

If the GasketThickness parameter is set, it will be used for all rings that do not have the H parameter set.
Note: H cannot be greater than GasketThickness.
FLATFACE

This is a gasket with a rectangular profile.

GasketID: Inside diameter of gasket.

GasketOD: Outside diameter of gasket.

GasketThickness: Thickness of gasket.

OVAL

This is a gasket with an oval or round profile.

GasketDiameter: Gasket pitch diameter.

GasketWidth: Width of gasket.

GasketThickness: Thickness of gasket.
Note: GasketWidth can be greater than GasketThickness as in ASME B16. 20 Jacketed, or less than as in ASME B16.20 Oval, or equal to as in AS 2129 O-Ring.
OCTAGONAL_R

Specific shape gasket for ASME B16.20 Type R standard.

WIDTH_A: Width of gasket.

HEIGHT_H: Height of gasket.

EDGE_C: Width of flat.

PITCH_DIAMETER_P: Average pitch diameter of gasket.

ANGLE_R1: Radius of ring.

OCTAGONAL_RX

Specific shape gasket for ASME B16.20 Type RX standard.

WIDTH_A: Width of gasket.

EDGE_C: Width of flat.

OUT_BEVEL_D: Height of outside bevel.

HEIGHT_H: Height of gasket.

OUT_DIAMETER_OD: Outside diameter of gasket.

ANGLE_R1: Radius of ring.

OCTAGONAL_BX

Specific shape gasket for ASME B16.20 Type BX standard.

WIDTH_A: Width of gasket.

EDGE_C: Width of flat.

HEIGHT_H: Height of gasket.

OUT_DIAMETER_OD: Outside diameter of gasket.

OUT_FLAT_DIAMETER_ODT: Outside diameter of flat.

ANGLE_R1: Radius of ring.

JACKET_A

Specific shape gasket for DIN EN 1514-3 Type A standard.

GasketID: Inside diameter of gasket.

JacketOD: Outside diameter of jacket.

GasketOD: Outside diameter of gasket.

JacketThickness: Thickness of jacked.

GasketThickness: Thickness of whole gasket (core and 2x jacked).

JacketTail: Length of jacket tail.

Angle: Jacket inclination angle in front of the tail.

JACKET_C

Specific shape gasket for DIN EN 1514-3 Type C standard.

GasketID: Inside diameter of gasket.

JacketOD: Outside diameter of jacket.

GasketOD: Outside diameter of gasket.

JacketThickness: Thickness of jacked.

GasketThickness: Thickness of whole gasket (core and 2x jacked).

Note: The gasket may contain bolt holes. In order to add them, you need to specify three parameters. You can see the sample in ASME B 16.21 FullFace gasket.

N_HOLES: Number of holes.

HOLE_D: Hole diameter.

HOLES_CRCL_D: The circle diameter on which the holes are located.