Skip to content

Instantly share code, notes, and snippets.

@idt12312
Created May 18, 2017 11:43
Show Gist options
  • Save idt12312/20e7ea9663e6100b7bcbd6576883ab54 to your computer and use it in GitHub Desktop.
Save idt12312/20e7ea9663e6100b7bcbd6576883ab54 to your computer and use it in GitHub Desktop.
import pcbnew
#pcbnewで開いている基板(BORAD)への参照を取得する
board = pcbnew.GetBoard()
#基板上の"R1"というリファレンスを持つ部品(MODULE)への参照を取得する
r1 = board.FindModuleByReference("R1")
#r1(MODULE)のもつリファレンスを文字列として取得する
print r1.GetReference()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment