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


Allows program specific operations into an executable. If the return value is different from the programmed value (here = 1), execution is considered to have failed.

The document location is passed as an argument.

 


Example of a stand-alone program (console application in VB.net) :


' Reading arguments

    Dim args() As String = Environment.GetCommandLineArgs()

    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 room

            Case SLDASM

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

            Case SLDDRW

                EnvironmentExit(3)' Return 3 if the path indicates a layout

            Case Else

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

        End Select

    End Sub