hexagon logo

Creation of a script for a toolbar button to insert a command line

Hello all!!

How to create a script to insert this command lines in a program?
In the end i want to create a button for a toolbar that runs this script.


C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
Dimensional Numero: ?
C2 =COMMENT/INPUT,NO,FULL SCREEN=NO,
Molde Numero: ?
C3 =COMMENT/INPUT,NO,FULL SCREEN=NO,
Nome do Molde (Cliente): ?
C4 =COMMENT/INPUT,NO,FULL SCREEN=NO,
Referencia das peças: ?
C5 =COMMENT/INPUT,NO,FULL SCREEN=NO,
Quantidade de Peças: ?
C6 =COMMENT/INPUT,NO,FULL SCREEN=NO,
Teste Numero: ?
C7 =COMMENT/INPUT,NO,FULL SCREEN=NO,
Revisão do Relatório: ?
C8 =COMMENT/INPUT,NO,FULL SCREEN=NO,
Elaborado por: ?



Thank you in advanced for the help.

Lionheart1º
Parents

  • Hi, I have script with buttons, it working well but I need add variables to to text but I cant pass any variable to text. As example: Text 52,113,53,12, "Serial Number: " Will give Serial Number: , but I need as example Serial Number: 123. How I can pass variable (as example 123) to dialog ?

    Regards
Reply

  • Hi, I have script with buttons, it working well but I need add variables to to text but I cant pass any variable to text. As example: Text 52,113,53,12, "Serial Number: " Will give Serial Number: , but I need as example Serial Number: 123. How I can pass variable (as example 123) to dialog ?

    Regards
Children
  • Post your Basic script code Darius11 so we can see what you have so far.
  • sorry about not posting code. Piece of code is this:
    'D D D
    'Create Dialog With these Input items:
    Begin Dialog DIALOG_1 50,10, 200, 80,"Save report", .Enable
    'Text 20,10,200,12, "Total measured dimensions: & InTolValue"
    Text 20,20,200,12, "Do you want save measured data?"
    OKButton 35,40,48,26
    CancelButton 120,40,48,26
    End Dialog
    ' Set the Dialog For Access:
    Dim Dialg As DIALOG_1
    button1 = Dialog(Dialg)
    ' Declar VB variables:
    Dim Progtype As String
    'Quit If Dialog got canceled, Or go On To take the operator inputs And Put them into VB variables:
    If button1 = 0 Then
    Progtype= "END"
    Else
    'D D D
    END IF

    Idea is to present in dialog info how many dimensions was evaluated and how many dimensions was wrong. At the moment I do believe that once I will finish piece of script, which will proper count dimensions out of tolerance and in tolerance and that info. should help operator to take decision save/not save results of measurement.
  • You will have to add a TextBox (EditBox_1) to display the requested info.
    Example:

    'D D D
    'Create Dialog With these Input items:
    Begin Dialog DIALOG_1 50,10, 206, 80, "Save report"
    Text 20,6,104,12, "Total measured dimensions:"
    Text 20,20,124,12, "Do you want save measured data?"
    OKButton 35,40,48,26
    CancelButton 120,40,48,26
    TextBox 118,5,37,12, .EditBox_1
    End Dialog

    ' Set the Dialog For Access:
    Dim Dialg As DIALOG_1

    Dialg.EditBox_1 = "Text"

    button1 = Dialog(Dialg)
    ' Declar VB variables:
    Dim Progtype As String
    'Quit If Dialog got canceled, Or go On To take the operator inputs And Put them into VB variables:
    If button1 = 0 Then
    Progtype= "END"
    Else
    'D D D
    End If