# Vias in a footprint using Eagle

I have a fairly complex footprint which I have created in Eagle. Particularly the complexity comes from the number of vias required for the footprint (this is an RF part). Initially I tried to drop the vias using the through hole pads as a replacement, but when I do this, it will not allow me to select the layers which it goes through, instead it just penetrates the entire board.

This component will be placed on a 4 layer PCB. Ultimately my goal is to only have the vias go from layers 1-2 and not completely through (1-4). Should I be using the via tool in the actual board layout? If so I'm not sure there is an easy way to place the vias after the part is placed in the layout. Maybe in the footprint I should use markers, and replace the markers with vias in the layout. Here is a link to the data sheet and the footprint: BPF-A127+

Apparently, Eagle doesn't allow vias in footprints (only pads). Markers will work to check alignment, but for creating them you can write a script that takes the part designator as parameter, and uses it to extract location and rotation to place the vias at the correct coordinates. Something like place_bpf_vias(part_designator)