Reading the File
Reading the File
Pressing will start reading the file. How the file is read is dependant on the file format chosen: PRIMER spotweld format, Catia spotweld format or Custom format.
PRIMER spotweld file
PRIMER will read the first 50 lines of the file and put a preview on the screen.

XML connection file
From version 9.3 PRIMER can use a new xml format for connections. This contains more information than the PRIMER spotweld file and can be used to describe bolts and adhesive lines as well as spotwelds. Each connection entry consists of connection type, point (or line info) and a list of the layers to be connected. A layer is typically a part, but it may consist of multiple parts, see modifying connection layers.
Layers provide a powerful way of ensuring that correct connectivity in a model is achieved, as a connection will only be passed as valid (or realized) if it successfully joins all the layers in its definition.
For spotwelds, the file includes the spotweld part ID, the FE type (beam, solid or multiple solids) and the diameter (for solid welds). For bolts, FE type is defined as NRB or merge (for these an optional rigid material id may be given) and the diameter. For adhesives, adhesive width, number of elements across the width and element length are stored. Also for adhesive, the part ID of the solids in the connection are stored, along with additional information for the path of the adhesive.
Prior to read, PRIMER will scan the file to check if any required information is missing (e.g. part ID or diameter), and you will be able to supply this to the edit panel. Such information will only be used for connections which have parameters missing in the xml data. See Choosing part for beams/solids and filename for more details.
On completion of read, if any connections have not been made they will be put on the connection table for you to investigate and fix.
For models with existing connections, the xml connection file may be written out from the connection table using the "Update & write to file" function.
For more information on the format see the Spotweld file formats section.
Catia spotweld file
PRIMER will read the Catia spotweld file automatically and go straight to step 7 at the end of the reading process. The format of the file is set within PRIMER and therefore it is important to check that the Catia weld file matches the Catia format set by PRIMER.
UG spotweld file
PRIMER will read the UG spotweld file automatically and go straight to step 7 at the end of the reading process. The format of the file is set within PRIMER and therefore it is important to check that the UG weld file matches the UG format set by PRIMER.
VIP spotweld file
PRIMER will read the VIP spotweld file automatically and go straight to step 7 at the end of the reading process. The format of the file is set within PRIMER and therefore it is important to check that the VIP weld file matches the VIP format set by PRIMER.
Master connection file
PRIMER will read the Master Connection File (MCF) automatically and go straight to step 7 at the end of the reading process. The format of the file is set within PRIMER and therefore it is important to check that the MCF matches the MCF format set by PRIMER.
Custom format
If the file is a custom format, PRIMER will ask you a series of questions to determine the format of the file. Once the format has been determined you will be able to read the file.
Step 1: Fixed/DelimitedThe first step is to determine the format of the file. PRIMER will try to read 2 types of files: Files that have fields of fixed widths (these are like the fields in Ansys LS-DYNA keyword files that are generally 10 characters wide). Files that have fields that are separated by a specific character such as a comma. An example of a file like this would be a CSV file produced by a spreadsheet program. PRIMER shows a preview of the file at the bottom of the panel. You can use this to view the file and determine which of the 2 formats best describes the file. Once you have chosen the format that best describes your file press to go onto the next step. will return you to the main screen. |
![]() |
Step 2: Comment linesThe second step is to determine if any lines in the file should be treated as comment lines and skipped. This is like comment lines in a Ansys LS-DYNA keyword file that can begin with a '$' character. Once you have chosen the comment setting press to go onto the next step. To go back to the previous step press . will return you to the main screen. |
|
Step 3: Skip strings and charactersThe third step is to determine if any lines in the file that contain specific strings or characters should be skipped. Once you have chosen the string and character settings press to go onto the next step. To go back to the previous step press . will return you to the main screen. |
|
Step 4: Continuation linesThe fourth step is to determine if spotweld data can continue onto a second line. It is strongly recommended that you have one line per spotweld. However, if spotweld data can continue on to a second line PRIMER will try to read it with these settings. Once you have chosen the continuation setting press to go onto the next step. To go back to the previous step press . will return you to the main screen. |
|
Step 5: Choosing delimitersThe fifth step is only done if you are reading a file in delimited format. You need to tell PRIMER what character(s) to use as field delimiters. Additionally there is a switch to delimiter. This is most commonly used when the 'space' character is used as the field delimiter. If some of the fields are separated by more than one 'space' then PRIMER will treat it as a single 'space'. Once you have chosen the delimiter setting press to go onto the next step. To go back to the previous step press . will return you to the main screen. |
|
Step 6: Choosing fields
The sixth step allows you to choose which fields are which. PRIMER shows a preview (the first 50 lines) of the file showing how it will decode the fields from the settings you have chosen in the previous steps.
Choosing field types

The image above shows the fields that PRIMER has read. If it is incorrect you can go back and change the settings as necessary. In this example the fields are:
| Field | columns | description |
| 1 | 1-10 | Skip this text |
| 2 | 11-20 | Weld ID |
| 3 | 21-30 | Skip this text |
| 4 | 31-40 | X coordinate |
| 5 | 41-50 | Y coordinate |
| 6 | 51-60 | Z coordinate |
| 7 | 61-70 | Skip this text |
| 8 | 71-80 | Panel ID 1 |
| 9 | 81-90 | Panel ID 2 |
|
Initially all the fields are . Use the popup to change the field to the required type. For example to change field 1 to 'skip this field':
|
Repeat this until all the fields have been set to the required values. You MUST define the , , and s.

Choosing field widths
In the example image below the fields are not just 10 columns wide. We need to change the column widths.

Field 1 should be columns 1-5, not 1-10. To change this you can either type in the new column numbers in the blue boxes or you can drag the columns to the correct sizes. The yellow bars enable you to drag the columns by clicking on one of them with the mouse and dragging it to the left or right until it is in the correct place.
Repeat this process until all the fields are the correct width

The field types can then be chosen as necessary.

Step 7: Warnings and errors after reading the file
After PRIMER has finished reading the spotweld file it will display a listing panel giving information on the welds it has not been able to create.

PRIMER will also do a check of all the welds that it has created to see if any are too close together (the pitch between the welds is too small).
Step 8: Fixing bad welds
If any of the welds in the file could not be created PRIMER will put them onto the connection table and you can use it to visualise and fix the welds. For more details see Connection Table.
