DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Buttons

Solved!
Go to solution

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 Smiley Happy. 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

 

 

0 Kudos
Message 1 of 3
(4,372 Views)
Solution
Accepted by topic author Mandishah

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

0 Kudos
Message 2 of 3
(4,364 Views)

Thx andreas 🙂 i appreciate your reply

0 Kudos
Message 3 of 3
(4,347 Views)