'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright by Weinmann Holzbausystemtechnik GmbH (c) 2004
'
' Filename:
'
' Description:
'
' Author:                tb32sot
'
' Date:                        20040121
'
' Version:                V0.01
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

SUB MAIN

 DIM dPX(16)
 DIM i
 DIM sIni
 DIM Title
 DIM BALKEN_WIDTH

 'Holen Parameterbezeichnungen abhaengig von der Landessprache
 sIni = "l" + GETACTUALLANGUAGE() + ".ini"

IF NOT FINDFIRSTSELECTED THEN
	DIM BEAMCOUNTER

	BEAMCOUNTER = GETCOUNTTYPE(CalcType("LS"))
	BEAMCOUNTER = BEAMCOUNTER + GETCOUNTTYPE(CalcType("QS"))
	BEAMCOUNTER = BEAMCOUNTER + GETCOUNTTYPE(CalcType("BT4"))
	BEAMCOUNTER = BEAMCOUNTER + GETCOUNTTYPE(CalcType("BT6"))

	IF BEAMCOUNTER = 1 THEN
		IF GETCOUNTTYPE(CalcType("LS")) = 1 THEN
			FINDFIRSTTYPE(CalcType("LS"))
		END IF
		IF GETCOUNTTYPE(CalcType("QS")) = 1 THEN
			FINDFIRSTTYPE(CalcType("QS"))
		END IF
		IF GETCOUNTTYPE(CalcType("BT4")) = 1 THEN
			FINDFIRSTTYPE(CalcType("BT4"))
		END IF
		IF GETCOUNTTYPE(CalcType("BT6")) = 1 THEN
			FINDFIRSTTYPE(CalcType("BT6"))
		END IF
	ELSE
	  MsgBox GETPRIVATEPROFILESTRING("Fehler", "F1", " ", sIni), _
		vbOkOnly + vbCritical + vbSystemModal,"Error"
	  exit sub
	END IF
END IF

IF NOT ( ISBEAM OR ( ISBEAMPROCESSING AND SELECTPARENTBEAM() ) ) THEN
  MsgBox GETPRIVATEPROFILESTRING("Fehler", "F2", " ", sIni), _
    vbOkOnly + vbCritical + vbSystemModal,"Error"
  exit sub
END IF

BALKEN_WIDTH = GETPARAM(2)


FOR i = LBOUND(dPX) TO UBOUND(dPX)
    dPX(i) = 0.0
NEXT

dPX(16) = 4 ' anfgang orientiert
dPX(6) = 90 ' perpendicular
dPX(0) = 2

Title = ""

'DO
'
'  dPX(0) = InputBoxI( _
'      GETPRIVATEPROFILESTRING("Ebene", "T1", " ", sIni) & vbCrLf & vbCrLf & _
'      GETPRIVATEPROFILESTRING("Ebene", "T2", " ", sIni) & vbCrLf & vbCrLf & _
'      GETPRIVATEPROFILESTRING("Ebene", "T3", " ", sIni) & vbCrLf & _
'      GETPRIVATEPROFILESTRING("Ebene", "T4", " ", sIni) & vbCrLf & _
'      GETPRIVATEPROFILESTRING("Ebene", "T5", " ", sIni) & vbCrLf & _
'      GETPRIVATEPROFILESTRING("Ebene", "T6", " ", sIni) & vbCrLf & vbCrLf,Title,1)
'
'  IF bInputBoxCancel = 1 THEN
'    EXIT SUB
'  END IF
'
'  IF (1 <= dPX(0)) and (dPX(0) <= 4)  THEN
'    EXIT DO
'  ELSE
'    MsgBox GETPRIVATEPROFILESTRING("Fehler", "F3", " ", sIni),vbOkOnly + vbCritical + vbSystemModal,"Error"
'  END IF
'LOOP

	'Farbe auswaehlen Anfang
'	DO
'
'	  dPX(2) = InputBoxI( _
'	      GETPRIVATEPROFILESTRING("Farbe", "T1", " ", sIni) & vbCrLf & vbCrLf & _
'	      GETPRIVATEPROFILESTRING("Farbe", "T2", " ", sIni) & vbCrLf & vbCrLf & _
'	      GETPRIVATEPROFILESTRING("Farbe", "T3", " ", sIni) & vbCrLf & _
'	      GETPRIVATEPROFILESTRING("Farbe", "T4", " ", sIni) & vbCrLf & _
'	      GETPRIVATEPROFILESTRING("Farbe", "T5", " ", sIni) & vbCrLf & _
'	      GETPRIVATEPROFILESTRING("Farbe", "T6", " ", sIni) & vbCrLf & vbCrLf,Title,1)
'
'	  IF bInputBoxCancel = 1 THEN
'	    EXIT SUB
'	  END IF
'
'	  IF (1 <= dPX(2)) and (dPX(2) <= 4)  THEN
'	    EXIT DO
'	  ELSE
'	    MsgBox GETPRIVATEPROFILESTRING("Fehler", "F3", " ", sIni),vbOkOnly + vbCritical + vbSystemModal,"Error"
'	  END IF
'	LOOP

	dPX(2) = 1
	dPX(2) = 1022 + (dPX(2)*100)
	'Farbe auswaehlen Ende

DIM RETVAL

        DO
            dPX(1) = InputBoxFLoc("P1:" & vbCrLf & vbCrLf & GETPRIVATEPROFILESTRING("Strichmarkierer", "", " ", sIni),"",0)

            IF bInputBoxCancel = 1 OR dPX(1) = 0 THEN
               EXIT DO
            ELSE
            ' MPL xa,ya,xe,ye,i,e; Marking line
	    MPL dPX(1) ,0 ,dPX(1),BALKEN_WIDTH,dPX(2),dPX(0)

'                RETVAL = BTLFUNCTION(dPX(16),60,dPX(0),dPX(1),dPX(2),dPX(3),dPX(4),dPX(5),dPX(6),dPX(7),dPX(8),dPX(9),dPX(10),dPX(11),dPX(12),dPX(13),dPX(14),dPX(15))
'                IF NOT RETVAL THEN
'                   MsgBox GETLASTERROR,vbOkOnly + vbCritical + vbSystemModal,"Error"
'                END IF
            END IF
        LOOP
END SUB

MAIN
