What is %R when clicking on REF**

I have completed my first layout in PCBNew (Yay), during which I created a couple of Footprints. (Double Yay).
Can somebody please tell me wht the second REF** is for and what %R means when I double click on it.
Also I have used, from the main library, component Diode_THT D_DO35_SOD27_P7.62mm_Horizontal.
When I look at the finished product the Value i.e. 1N4001, does not show up.

Thanks
Mike

The %R I think is a substitution of the reference value of the symbol (from the schematic). There’s been discussion of modifying this behavior to include arbitrary variables/properties. I think they’ve settled on using braces (I.e. {PropertyName}) but of course this is highly dependent on your KiCAD version. I can’t find the discussion on the forums, so it may have occurred on the developer mailing list.

REF** is the primary reference designator, it is substituted by the reference designator from the schematic.

%R is substituted by the value of REF**.

REF** can be used only once in a footprint. %R can be used many times.

In the future in v6, or now in the development version 5.99, you can use ${REFERENCE}. See New string replacement options for kicad assets.

This is not really true. It might have been the case in the pre version 4 file format, but now there is an explicit reference field. It does not matter what the content of that field is it will always be replaced by the references. REF** is just used because that was used in older footprints and there was no reason to change it. REF** is also the default set when creating a new footprint via the footprint editor.

REF** actually does nothing in the current file format.
%R is used to convert any user text field (a normal text field) into a copy of the reference.


Similarly, with the value field. The main field is by default filled with the footprint name but you can actually have anything in that field and it will still be replaced by the value set in the schematic.
%V is used to create duplicates of that one, VAL** was used in pre version 4 but no longer does anything special as its role was taken over by the main value field.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.