When importing a CAD file into Elements the types of CAD files Elements can import are shown as Gerber files, DXF files, Elements CAD files, and text or comma separated value (CSV) files. In this article we will focus on the text or CSV files and how they can be used with the Programmable Text File. This feature allows a user to create a usable CAD file in Elements without a file in typical CAD formats.
This is especially useful when either the CAD file format is not one that Elements can import, or a CAD file cannot be given in one of the formats Elements supports. In these cases, a file with nominal locations of features and other optional information can be used to generate the file in Elements CAD File (.ecf) format.
Programmable Text File (PTF) Setup
The first step is to define what our PTF looks like. To do this go to Setup->PTF Setup from the Project tab in Elements. A dialog will pop up as in the image below and will allow the user to define how their PTF will look.
There are 4 parts that need to be defined:
- File name: Browse to a location where the PTF will be saved and give it the desired name.
- Separator: Each item in a line in the file must be separated by the character that is chosen from this dropdown. The comma is the most common choice.
- Number of Columns: How many values are in each line of the PTF. At a minimum this should be 2 and include the X and Y nominal location.
- Definition and order of columns: This defines what the values in each line will be interpreted as by Elements. In the image above the first value will be the nominal X location, the second is the nominal Y location, the third is the angle of rotation, and the fourth is the reference ID of the feature. All of these must be separated by the chosen separator in the text or CSV file. The order and meaning for the parameters can be customized as needed.
Once all of these are defined, the .ptf file can be saved and is ready to be used.
Programmable Text File (PTF) Usage
In order to use the PTF file, the path to the .ptf file must first be set. Go to Setup->Settings in the Project tab. Then navigate to the File Paths tab and then browse to the .ptf file as shown below.
Now that the file path is set, the text or CSV file can now be imported. In the dialog for importing a CAD file, make sure that TXT File is chosen and Use PTF File is checked as shown below. Then choose the desired .txt or .csv file that matches the format that was defined in the PTF setup. The file used with this sample PTF is also shown below. Note, this can also be a .csv file saved in Excel or similar software if the comma separator was chosen.
Upon importing the file, dots will be shown in the CAD model window where the features are supposed to be. By going into the Edit tab in project view, the user can select the desired dots and using the Assign feature, assign these dots to be any component that is in the component library, including macros which were covered in the last issue.
The PTF feature in Elements is very powerful and flexible when combined with Elements’ concept of components. All it requires is a formatted text file and the desired components to be in the Elements library. With these two things, a fully usable Elements CAD file can be created and used for inspection in minutes. This reduces the dependency on having to have a CAD file of a certain format and allows the Elements user to create a CAD file without being proficient in CAD. For more information, please reference page 2-61 in the current Elements 5 reference guide.