Sample Data
This table shows electronic symbols and their assigned PCB footprints.
| Cell | Value |
|---|---|
| A1 | Symbol |
| B1 | Footprint |
| A2 | Resistor |
| B2 | R_0805 |
| A3 | Capacitor |
| B3 | C_0603 |
| A4 | LED |
| B4 | LED_1206 |
| A5 | Microcontroller |
| B5 | QFP_64 |
This table shows electronic symbols and their assigned PCB footprints.
| Cell | Value |
|---|---|
| A1 | Symbol |
| B1 | Footprint |
| A2 | Resistor |
| B2 | R_0805 |
| A3 | Capacitor |
| B3 | C_0603 |
| A4 | LED |
| B4 | LED_1206 |
| A5 | Microcontroller |
| B5 | QFP_64 |
LOOKUP(Symbol, SymbolList, FootprintList)A B 1 Symbol Footprint 2 Resistor R_0805 3 Capacitor C_0603 <-- Lookup target 4 LED LED_1206 5 Microcontroller QFP_64
A B 1 Symbol Footprint 2 Resistor R_0805 3 Capacitor C_0603 <-- Result of lookup 4 LED LED_1206 5 Microcontroller QFP_64
symbol = getSymbol('R1')
symbol.setFootprint('Resistor_SMD_0805')
print(symbol.footprint)symbol = getSymbol('C1')
symbol.setFootprint(Resistor_SMD_0805)for symbol in schematic.symbols:
if 'R' in symbol.name:
symbol.setFootprint('Resistor_SMD_0805')
elif 'C' in symbol.name:
symbol.setFootprint('Capacitor_SMD_0603')
else:
symbol.setFootprint('Generic_Footprint')Pass the test and this pattern moves unknown