how to create a dialog box or message box in mechanical without ok and cancel button
karthik
Member Posts: 6
**
in Structures
how to create a dialog box or message box in mechanical without ok and cancel button
0
Answers
-
MessageSeverityType.Warning
msg ='Hello Kitty' msg = Ansys.Mechanical.Application.Message(msg , MessageSeverityType.Warning) ExtAPI.Application.Messages.Add(msg)
0 -
This is another example:
import clr clr.AddReference("Ans.UI") from Ansys.UI import * clr.AddReference("Ans.Utilities") clr.AddReference('Ans.UI.Toolkit') clr.AddReference("Ans.UI.Toolkit.Base") import Ansys.UI.Toolkit import Ansys.Utilities def GiveUserFeedback(Title, Message, MsgTypeStr="Info"): try: exec("MsgType= Ansys.UI.Toolkit.MessageBoxType."+MsgTypeStr) except: MsgType= Ansys.UI.Toolkit.MessageBoxType.Info MsgBut = Ansys.UI.Toolkit.MessageBoxButtons.OK MsgBox = Ansys.UI.Toolkit.MessageBox Result = MsgBox.Show(Ansys.UI.Toolkit.Dialog(),Message,Title,MsgType,MsgBut) return Result
1