pass variable directly to script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • pass variable directly to script

    Hi All,

    I hope this makes sense.

    Is there a way to pass a variable to a basic script when it is called from a PCDMIS program?
    I see there is the ability to provide Destination Expressions in the PCDMIS program, can I access these from the script?
    I know I can access assignment values but I'm looking for something to be passed when the script was called and could be different if I called the script multiple times.

    Thanks
    JVWhy CAD++ 2013 MR1 SP5 B&S Global Advantage.
    Optimism is the leading cause of disappointment.

  • #2
    You can use a script command in the edit window like this -

    CS2 =SCRIPT/FILENAME= C:\USERS\PUBLIC\DOCUMENTS\WAI\PC-DMIS\2013 MR1\SCRIPT1.BAS
    FUNCTION/Main,SHOW=YES,ARG1="Don",,
    STARTSCRIPT/
    ENDSCRIPT/

    and then a script like this -


    Sub main(strID As String)

    MsgBox "Hello " + strID

    End Sub

    Comment


    • #3
      PERFECT, Exactly what I needed.
      JVWhy CAD++ 2013 MR1 SP5 B&S Global Advantage.
      Optimism is the leading cause of disappointment.

      Comment

      Related Topics

      Collapse

      Working...
      X