1、宏录制 file--》scripting 保存为xx.scr
2、光绘层快速显示设置
a)先创建光绘的file文件保存到C:\Cadence\Cadence_SPB_17.2-2016\share\local\pcb\views
例如:top_placement.color
b)在C:\Cadence\SPB_Data\pcbenv下创建top_placement.scr
c)将top_placement.scr绑定快捷方式。在C:\Cadence\SPB_Data\pcbenv\env下
alias 001 "replay C:\Cadence\SPB_Data\pcbenv\top_placement.scr"
注意:“top_placement”的名称在三个地方要一致。三者的关系是步骤c调用步骤b调用a
3、部分scr文件代码的含义的猜测
#程序头,说明版本
version 17.2
setwindow pcb #加载PCB(软件) 窗口
trapsize 22 #PCB 窗口的大小
generaledit #可以开始常规的编辑
color192 # 加载颜色集合
generaledit #开始
#找class的上级或上上级菜单 类似这种 "Constraints region"由空格组成的字符串都需加""
QtSignal CVDLayerSplitter CVDLayersTree itemSelectionChanged Areas "Constraints region"
#添加subclass的坐标,选择class之后,subclass的坐标都变成如下方x递增,y不变的格式
QtSignal CVDLayerTable CVDLayerTableDelegate addedToLayers 0 0
QtSignal CVDLayerTable CVDLayerTableDelegate addedToLayers 1 0
QtSignal CVDLayerTable CVDLayerTableDelegate addedToLayers 2 0
QtSignal CVDLayerTable CVDLayerTableDelegate addedToLayers 3 0
#non-conductor的选择方式
QtSignal CVDLayerSplitter CVDLayersTree itemSelectionChanged Stack-Up Non-Conductor +
QtSignal Drc
#点击OK退出界面
QtSignal ColorVisibilityDialog CVDOkButton clicked
#不同class下的subclass任意排序显示
QtSignal CVDLayerSplitter CVDLayersTree itemSelectionChanged Stack-Up Conductor Pin
QtSignal CVDLayerTable CVDLayerTableDelegate addedToLayers 0 0
QtSignal CVDLayerSplitter CVDLayersTree itemSelectionChanged Areas "Route keepout"
QtSignal CVDLayerTable CVDLayerTableDelegate addedToLayers 3 0
QtSignal CVDLayerSplitter CVDLayersTree itemSelectionChanged Geometry "Board geometry"
QtSignal CVDLayerTable CVDLayerTableDelegate addedToLayers 3 0
QtSignal ColorVisibilityDialog CVDOkButton clicked
#添加颜色,颜色序号是固定的,192种颜色
QtSignal CVPLayerGrid CVPLayerColorTop rightClicked
QtSignal Popup CVPColorPickerButton2 clicked
QtSignal CVPLayerGrid CVPLayerColorGnd rightClicked
QtSignal Popup CVPColorPickerButton1 clicked
#不能在宏里调用宏的原因猜测。缺少导入前的“选择文件”,可能是cadence skill调用了Windows的#函数所以无法录制到脚本里
#导入宏
fillin "C:/Users/lg980/Desktop/0000/00.scr"
#执行宏
replay C:/Users/lg980/Desktop/0000/00.scr
#点击 Apply Button
QtSignal ColorVisibilityDialog CVDApplyButton clicked
#退出
exit