Introduction
Attributes are named lists of fields that add meaning to a file without changing its image: which layer it is, what a pad is for, which net or component an object belongs to. Names starting with a full stop are standard attributes. Others are user attributes.
Commands
| Command | Syntax | Behaviour |
|---|---|---|
| TF | %TFname[,fields]*% | File attribute, about the whole file. Cannot be changed once set. Usually in the header. |
| TA | %TAname[,fields]*% | Adds or updates an aperture attribute in the dictionary. It is attached to apertures made by later AD and AB commands, and to regions. |
| TO | %TOname[,fields]*% | Object attribute, attached to objects later made by D01, D03 and regions. |
| TD | %TD[name]*% | Deletes the named aperture or object attribute from the dictionary, or all of them. File attributes are not affected, and attributes already attached stay. |
A name can be used for only one kind of attribute at a time in the dictionary. A command may also be written as a G04 #@! comment, without the % signs.
File attributes
| Name | Fields |
|---|---|
.Part | Single, Array, FabricationPanel, Coupon, or Other followed by a mandatory description. |
.FileFunction | The role of the file. See below. |
.FilePolarity | Positive (the image shows where material is; recommended) or Negative. Solder masks are nearly always negative. Drill and rout files are always positive. |
.SameCoordinates | Optional identifier, a GUID recommended. Files with the same value are aligned. |
.CreationDate | Full ISO 8601 date and time with time zone. |
.GenerationSoftware | Vendor, application, version. |
.ProjectId | Name, GUID (RFC 4122, version 1 or 4), revision. |
.MD5 | 32 hexadecimal digits: the MD5 of the file from its start up to, but not including, this command, with all CR and LF removed. Placed just before M02*. Not intended for transfer from design to manufacturing. |
Fabrication data must carry .FileFunction, .FilePolarity and .SameCoordinates. Professional use needs at least the first two.
.FileFunction values
| Fields | Meaning |
|---|---|
Copper,Lp,(Top|Inr|Bot)[,type] | Copper layer p, counted from 1. L1 is always the top, the through-hole component side. Type: Plane, Signal, Mixed or Hatched. |
Plated,i,j,(PTH|Blind|Buried)[,label] | Plated holes and slots spanning layers i to j, in either order. Label: Drill, Rout or Mixed. |
NonPlated,i,j,(NPTH|Blind|Buried)[,label] | Non-plated holes and slots, with the same labels. |
Profile,(P|NP) | Board outline, edge-plated or not. Mandatory in a fabrication data set. |
Soldermask,(Top|Bot)[,index] | Solder mask. The image usually shows the openings. The index, from 1 outwards from the copper, is used only if there is more than one. |
Legend,(Top|Bot)[,index] | Printed legend (silk screen). |
Component,Lp,(Top|Bot) | Component placement layer. |
Paste,(Top|Bot) | Solder paste. |
Glue,(Top|Bot) | Glue spots. |
Carbonmask, Goldmask, Heatsinkmask, Peelablemask, Silvermask, Tinmask, each ,(Top|Bot)[,index] | The named mask. |
Depthrout,(Top|Bot) | Depth-controlled routing. |
Vcut[,(Top|Bot)] | V-scoring. Without a side the file applies to both; otherwise each side has a file. |
Viafill | Vias to be filled. |
Pads,(Top|Bot) | Pads only. Not needed in a fabrication set. |
Other,description | Any other data layer. The description is mandatory. |
| Fields | Meaning |
|---|---|
Drillmap | Drill map. |
FabricationDrawing | Fabrication drawing. |
Vcutmap | V-cut map. |
AssemblyDrawing,(Top|Bot) | Assembly drawing. |
ArrayDrawing | Array (panel) drawing. |
OtherDrawing,description | Any other drawing. The description is mandatory. |
Examples: %TF.FileFunction,Copper,L2,Inr,Plane*%, %TF.FileFunction,NonPlated,1,4,NPTH,Rout*%, %TF.FileFunction,Profile,NP*%.
Aperture attributes
| Name | Fields |
|---|---|
.AperFunction | What objects made with the aperture are for. See below. |
.DrillTolerance | Plus tolerance, minus tolerance: positive decimals in the file unit. |
.FlashText | Text, (B|C) (barcode or characters), (R|M) (readable or mirrored), font, size, comment. Everything after the text and its type may be left empty. |
| Value | Meaning |
|---|---|
ViaDrill[,type] | Via hole. Optional IPC-4761 protection type: Ia, Ib, IIa, IIb, IIIa, IIIb, IVa, IVb, V, VI, VII or None. |
BackDrill | Backdrill hole. |
ComponentDrill[,PressFit] | Component hole. PressFit applies to plated holes only. |
MechanicalDrill[,(Tooling|Breakout|Other)] | Mechanical hole. |
CastellatedDrill | Castellation hole. |
OtherDrill,description | Other holes. |
| Value | Meaning |
|---|---|
ComponentPad | Through-hole component pad, on all layers. |
SMDPad,(CuDef|SMDef) | Surface-mount pad, defined by copper or by solder mask. Outer layers only. |
BGAPad,(CuDef|SMDef) | Ball grid array pad. Outer layers only. |
ConnectorPad | Edge connector pad, outer layers. |
HeatsinkPad | Heat sink pad. |
ViaPad | Via pad. |
TestPad | Test pad, outer layers. |
CastellatedPad | Castellated pad. |
FiducialPad,(Local|Global|Panel) | Fiducial mark. |
ThermalReliefPad | Thermal relief. |
WasherPad | Pad around a non-plated hole, with no electrical function. |
AntiPad | Clearing pad. It must still be flashed with clear polarity. |
OtherPad,description | Other pads. |
Conductor | Conducting copper. Copper pours must carry it. |
EtchedComponent | Component formed in the copper. |
NonConductor | Copper that does not conduct, such as lettering. |
CopperBalancing | Copper added to even out plating. |
Border | Copper border of a production panel. |
OtherCopper,description | Other copper. |
| Value | Use |
|---|---|
ComponentMain | Flash at the component centroid with a 0.300 mm (0.012 in) circle. Needs .C. |
ComponentOutline,(Body|Lead2Lead|Footprint|Courtyard) | Closed path that does not cross itself, drawn with a 0.100 mm (0.004 in) circle. Needs .C. |
ComponentPin | Pin flash. The key pin uses a polygon P,0.360X4X0.0 mm (0.014X4X0.0 in), other pins a 0.1 mm (0.004 in) circle. Needs .P and may have .N. |
| Value | Meaning |
|---|---|
Profile | The board profile, copied into another layer. |
Material | Presence of material, for example solder mask openings (pad values are reserved for copper). |
NonMaterial | Drawing elements that are not material. |
Other,description | Anything else. |
Object attributes
| Name | Fields and use |
|---|---|
.N | One or more net names, on copper and plated drill objects and on component main and pin flashes. An empty name means no net. N/C means a net with a single pad. |
.P | Reference designator, pin number, optional pin function. On outer copper pads and component pins. A pad made of several flashes repeats it, and one object must not stand for several pads. |
.C | Reference designator, on any layer. Mandatory on component main flashes and outlines. |
The CAD netlist is given by putting .P and .N on each component pad. Vias and washer pads take no .P.
%TO.P,U1,4*%
%TO.N,Clk3*%
X15000000Y8000000D03*
%TD*%
Component attributes
These describe a component, and are valid only on ComponentMain flashes. Elsewhere they are ignored.
| Name | Fields |
|---|---|
.CRot | Rotation (decimal). Zero for a top component is as in IPC-7351B; zero for a bottom component is that flipped along the X axis. Positive is counterclockwise seen from the top. |
.CMfr | Manufacturer. |
.CMPN | Manufacturer part number. |
.CVal | Value, for example 220nF. |
.CMnt | Mount type: TH, SMD, Pressfit or Other. |
.CFtp | Footprint name, following IPC-7351B where possible. |
.CPgN | Package name, using JEDEC designators where possible. |
.CPgD | Package description. |
.CHgt | Height (decimal) in the file unit. |
.CLbN | Name of the component library. |
.CLbD | Description of the component library. |
.CSup | Supplier name and supplier part name, repeated for further suppliers. |
Component data goes in the two component layers. Their reference designators should be unique, and they link each outline to its main flash. Each pin flash must have .P. A local fiducial belonging to a footprint may be added there as a flash of a zero-size circle with .AperFunction,FiducialPad,Local and .C.
Links
Reference
- Ucamco downloads – the Gerber Layer Format Specification (revision 2026.05), chapter 5 of which defines the attributes