The document under test is a part, an assembly or a drawing.


Allows to program specific operations in an executable. The return value allows to control if the execution is valid, if the return value is different from the programmed value (here = 1) the execution is considered as failed.

The location of the document is passed as an argument.

 


Example of a standalone program (console application in VB.net) :


' Reading the arguments

    Dim args() As String = EnvironmentGetCommandLineArgs()

    Sub Main()

        If args.Length < 2 Then End

        Dim stPath As String = args(1)

        Select Case IO.Path.getExtension(stPath).toUpper

            Case ''.SLDPRT''

                EnvironmentExit(1)Return 1 if the path indicates a part

            Case ''.SLDASM''

                EnvironmentExit(2)Return 2 if the path indicates an assembly

            Case ''.SLDDRW''

                EnvironmentExit(3)Return 3 if the path indicates a drawing

            Case Else

                EnvironmentExit(0)Return 0 if the path does not indicate a part, an assembly or a drawing

        End Select

    End Sub