10-05-2012 07:50 AM
Hello Diadem users
I am a new user for Diadem , I have created my own analysis and calculation function and made an interface for it with a dialog box , I want to create a new button in the Diadem interface when it is clicked , the user dialog box appear , I tried to implement that but it does not work always give error , here is my code
Dim
MyBar
IfnotBarManager.Bars.Exists("MyBar") ThenSet MyBar = BarManager.Bars.Add("MyBar")
Else
Set MyBar = BarManager.Bars("MyBar")
Call MyBar.UsedActionObjs.RemoveAll
EndIf
Dim mybutton
IfnotBarManager.ActionObjs.Exists("Sensitivity") ThenSet oButton = BarManager.ActionObjs.Add("Sensitivity","CustomButton")
mybutton.OnClickCode.Code = "Call SUDDlgShow("Dlg1","Sens.SUD",NULL)"
PS : the error comes from the last line !!
If anyone has implemented such proceedure I will wait your gentle replay . I just want to know the method how to call the dialog box once the button is clicked
Thanks alot in advance
Aladdin
Design Engineer
Solved! Go to Solution.
10-05-2012 02:05 PM
Hello Madishah,
in your last line
mybutton.OnClickCode.Code = "Call SUDDlgShow("Dlg1","Sens.SUD",NULL)"
you have to use double quotation marks within the string. So the line should be :
mybutton.OnClickCode.Code = "Call SUDDlgShow(""Dlg1"",""Sens.SUD"",NULL)"
This is how you define a quotation mark with a string in VBScript
10-08-2012 05:26 AM
Thx andreas 🙂 i appreciate your reply