渦電流を考慮する部品をハイライトする。
import designer app = designer.GetApplication() def main(): highlight_parts_that_allow_eddy_current() def highlight_parts_that_allow_eddy_current(): flag_name = "EddyCurrentCalculation" view = app.View() view.ClearSelect() sel = view.GetCurrentSelection() model = app.GetCurrentModel() study = app.GetCurrentStudy() part_ID_list = model.GetPartIDs() sel.SetBlockUpdateView(True) if 0 < len(part_ID_list): for i in range (0, len(part_ID_list)): flag = study.GetMaterial(part_ID_list[i]).GetValue(flag_name) if flag == 1 or flag == 2: sel.SelectPart(part_ID_list[i]) sel.SetBlockUpdateView(False) main()


