Let’s Start Programming! Forums CATIA Macro Programming CATScript against MS VBA

This topic contains 1 reply, has 2 voices, and was last updated by  Matt 2 years, 12 months ago.

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

    Cornel
    Participant

    I have a code that runs correctly in CATScript.
    But with MS VBA I have an error on line 6.
    There is an HELP where I can read equivalence between CTAScript and MS VBA?!
    How would you write the line 6 in MS VBA?!

    Sub CATMain()
    Dim EnvVar As String
    ADL_ODT_IN = 55
    EnvVar = CATIA.SystemService.Environ(“ADL_ODT_IN”)
    CATIA.SystemService.Print “ADL_ODT_IN =” & EnvVar
    If (Len(EnvVar) < 10) Then
    BidVar = EnvVar
    Else
    BidVar = Mid(EnvVar, 1, 10)
    End If
    End Sub

    Attachments:
    #1394

    Matt
    Participant

    What did the error say? CATScript is similar to VBA but it doesn’t have all the functionality of VBA.

    This is VBScript versus VBA http://msdn.microsoft.com/en-us/library/ms970436.aspx

    • This reply was modified 2 years, 12 months ago by  Matt.
    • This reply was modified 2 years, 12 months ago by  Matt.
Viewing 2 posts - 1 through 2 (of 2 total)

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