Let’s Start Programming! Forums CATIA Macro Programming Run a CATscript from VB

This topic contains 1 reply, has 2 voices, and was last updated by  Emmett Ross 2 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1581

    Hello

    I have created a GUI using VB Express Edition which feeds in values to a CATIA document. I have created a CATscript which generates a model based on those values. I want to call the CATscript from the VB program and run it subsequently after the parameters have been input. How do I do that ?

    Thanks
    Dinesh

    #1583

    Emmett Ross
    Keymaster

    Hi. These codes might give you an idea of how to do it:

    vbs launcher
    Language=”VBSCRIPT”
    Sub CATMain()
    call CATIA.SystemService.ExecuteBackGroundProcessus(“WScript.exe c:\CATScripts\read_user_environment.vbs”)
    End Sub

    ‘how to call one catscript from another
    Sub CATMain()
    Dim EmptyPar()
    Dim ScPath
    ScPath = “D:\tmp”
    MsgBox “Save Operation will be executed on the active document!”
    CATIA.SystemService.ExecuteScript scpath, catScriptLibraryTypeDirectory, “Save.CATScript”, “CATMain”, EmptyPar
    End Sub

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘CATIA Macro Programming’ is closed to new topics and replies.