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:
- Mandatory creation parameters
- Optional creation parameters
- Configuration table
- 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
- 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
- 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
- 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.
- 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
- 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.
- 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 (").
- Copy and paste the content of this file into a TXT file, or even change extension of this CSV file to TXT.
- Add all mandatory creation parameters and, if needed, optional parameters to the beginning of this TXT file.
- Your file is ready to use.
Creation of custom standard part from existing TXT file
- In any drawing, run the -BMHARDWARE command and choose the option create Custom.
- In the Select configuration table file dialog box, select your created TXT file (or files).
- 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"
- Elbow
-
CATEGORY: "Elbow"
- Flange
-
CATEGORY: "Flange"
- Gasket
-
CATEGORY: "Gasket"
N_HOLES: Number of holes.
HOLE_D: Hole diameter.
HOLES_CRCL_D: The circle diameter on which the holes are located.