how-to-write-python-scripts-for-kicad
PCBNEW_LAYER_ID
enum PCB_LAYER_ID : int {
UNDEFINED_LAYER = -1 , UNSELECTED_LAYER = -2 , PCBNEW_LAYER_ID_START = 0 , F_Cu = PCBNEW_LAYER_ID_START ,
In1_Cu , In2_Cu , In3_Cu , In4_Cu ,
In5_Cu , In6_Cu , In7_Cu , In8_Cu ,
In9_Cu , In10_Cu , In11_Cu , In12_Cu ,
In13_Cu , In14_Cu , In15_Cu , In16_Cu ,
In17_Cu , In18_Cu , In19_Cu , In20_Cu ,
In21_Cu , In22_Cu , In23_Cu , In24_Cu ,
In25_Cu , In26_Cu , In27_Cu , In28_Cu ,
In29_Cu , In30_Cu , B_Cu , B_Adhes ,
F_Adhes , B_Paste , F_Paste , B_SilkS ,
F_SilkS , B_Mask , F_Mask , Dwgs_User ,
Cmts_User , Eco1_User , Eco2_User , Edge_Cuts ,
Margin , B_CrtYd , F_CrtYd , B_Fab ,
F_Fab , User_1 , User_2 , User_3 ,
User_4 , User_5 , User_6 , User_7 ,
User_8 , User_9 , Rescue , PCB_LAYER_ID_COUNT
}
PCBNew插件位置
更新Python脚本之后,必须重新启动Kicad,脚本才能起作用
KiCad项目很自豪地宣布发布5.1.0版本。这是KiCad的第一个次要版本,主要用于解决Linux GTK3的兼容性问题以及期待已久的python3支持。
添加了对Python 3的Pcbnew脚本支持。
G:\Program Files\KiCad\share\kicad\scripting\plugins
icon图标大小:32X32
Eeschema原理图Bom脚本位置
Bom脚本还是只支持Python2.7
G:\Program Files\KiCad\bin\scripting\plugins
Python库存放位置
python脚本中使用的第三方库,必须放在这个位置,否则会提示库不存在
G:\Program Files\KiCad\lib\python2.7\site-packages