'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright by Weinmann Holzbausystemtechnik GmbH (c) 2003
'
' Filename:	BALKEN.WMK
'
' Description:	Macro used to create a beam
'
' Author: TB32HVR
'
' Date:			20060210
'
' Version:		V0.01
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

SUB MAIN

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' variables and their initializing

DIM Balken_LENGTH		' Laenge des Balken in X
Balken_LENGTH = 1500
DIM Balken_WIDTH		' Breite des Balken in Y
Balken_WIDTH = 120
DIM Balken_HEIGHT		' Höhe des Balken in Z
Balken_HEIGHT = 60
DIM Balken_POSX			' Ablegeposition des Balken in X
Balken_POSX = 0
DIM Balken_POSY			' Ablegeposition des Balken in Y
Balken_POSY = 0
DIM Balken_POSZ			' Ablegeposition des Balken in Z
Balken_POSZ = 0
DIM Balken_INDEX		' Index des Balken
Balken_INDEX = 0
DIM Balken_NAME			' Name Balken
Balken_NAME = "Balken"
DIM Balken_COUNT		' Stueckzahl
Balken_COUNT = 1

DIM I
DIM sIni

DIM P0_Title
const MACROTITLE = "Macro"
DIM T3_Title

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


P0_Title = GETPRIVATEPROFILESTRING("GENERAL", "P0", " ", sIni)

Balken_LENGTH = InputBoxFLoc("P1:" ,MACROTITLE,Balken_LENGTH)

IF bInputBoxCancel = 1 THEN
	EXIT SUB	'	WScript.Quit 1
END IF

Balken_WIDTH = InputBoxF("P2:" ,MACROTITLE,Balken_WIDTH)

IF bInputBoxCancel = 1 THEN
	EXIT SUB	'	WScript.Quit 1
END IF

Balken_HEIGHT = InputBoxF("P3:" ,MACROTITLE,Balken_HEIGHT)

IF bInputBoxCancel = 1 THEN
	EXIT SUB	'	WScript.Quit 1
END IF

'Balken_COUNT = InputBoxI("P0:"  & vbcrlf & vbcrlf & P0_Title ,MACROTITLE,Balken_COUNT)
Balken_COUNT = InputBoxI(P0_Title ,MACROTITLE,Balken_COUNT)

IF bInputBoxCancel = 1 THEN
	EXIT SUB	'	WScript.Quit 1
END IF

For I = 1 To Balken_COUNT
	LS Balken_LENGTH, Balken_WIDTH, Balken_HEIGHT, Balken_POSX, Balken_POSY, Balken_INDEX, Balken_NAME, 0
	Balken_POSY = Balken_POSY+Balken_WIDTH+50
Next

END SUB
MAIN
