How do I check if the running instance of WB is Batch or Interactive Mode?
Ayush Kumar
Member, Moderator, Employee Posts: 450
✭✭✭✭
How do I check if the running instance of WB is Batch or Interactive Mode?
Tagged:
0
Answers
-
You can use the Boolean
ExtAPI.UserInterface.IsBatchMode
Example:
import clr clr.AddReference("Ansys.ACT.Core") import Ansys.ACT.Core AppAPI = Ansys.ACT.Core.ApplicationRepository.GetApplication("Project") ExtAPI = AppAPI.GetExtensionApi(None) is_batch_mode = ExtAPI.UserInterface.IsBatchMode if is_batch_mode: print "Batch MODE" else: print "Interactive MODE"
6