
! script name: vdraft.d/draftdefaults
! var_topic: set variational drafting constants

!A
!A NAME:
!A
!A 	Set Draft Constants VARIATIONAL
!A
!A DESCRIPTION:
!A
!A 	This script allows the following drafting constants to be set:
!A
!A 			TEXT HEIGHT
!A 			TEXT WIDTH
!A 			TEXT ANGLE
!A 			TEXT SLANT
!A 			ARROW HEIGHT
!A 			ARROW WIDTH
!A 			ARROW STYLE
!A			DIMENSION SCALE
!A			DECIMAL PLACES
!A			ANGLE DECIMAL PLACES
!A			RADII DECIMAL PLACES
!A			EXTENSION DIST
!A			EXTENSION GAP DIST
!A
!B INSTRUCTIONS:
!B
!B 	TEXT HEIGHT: This allows the height of each letter of text to
!B 		be dimensioned.
!B
!B 	TEXT WIDTH: This allows the width of each letter of text to be
!B 		dimensioned.
!B
!B 	TEXT ANGLE: This allows lines of text description to be output
!B 		at an angle.  The standard drafting dimensions are not
!B 		affected.
!B
!B 	TEXT SLANT: This allows the text to be output on a slant.
!B
!B 	ARROW HEIGHT: This allows the height of the arrows to be defined.
!B
!B 	ARROW WIDTH: This allows the width of the arrows to be defined.
!B
!B 	ARROW STYLE: This allows the arrow style to be changed.
!B		Permissible values are 1, 2, and 3.
!B
!B	DIMENSION SCALE: Scales the dimension values. Default 0 or 1.
!B
!B	DECIMAL PLACES: The number of decimal places in the dimension.
!B
!B	ANGLE DECIMAL PLACES: The number of decimal places in an
!B		angular dimension.
!B
!B	RADIUS DECIMAL PLACES: The number of decimal places in a
!B		radius/diameter dimension.
!B
!B	EXTENSION DIST:	The amount the extension line extends beyond
!B		the dimension. Spec is 0.125".
!B
!B	DIM GAP DIST: The length of the gap between the dimension
!B		point and the extension line. Spec is 0.0625".
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: draft constants ")

DIM Answer$[256]
DIM Name$[256]
DIM Destination$[256]

DEG

DeActivateUndo
Start:!

Var_object= CheckVarObject
IF (ExitScript(Destination$)) THEN Leave


Theight= GetDefault(WsTextHeight)
Twidth= GetDefault(WsTextWidth)
Tangle= GetDefault(WsTextAngle)
Tslant= GetDefault(WsTextSlant)
Aheight= GetDefault(WsArrowHeight)
Awidth= GetDefault(WsArrowWidth)
Astyle= GetDefault(WsArrowStyle)
Dim_scale= GetDefault(WsDimensionScale)
Places_after= GetDefault(WsPlacesAfter)
Angle_places= GetDefault(WsAPlacesAfter)
Radius_places= GetDefault(WsRPlacesAfter)
Extend_dist= GetDefault(WsExtendDist)
gap_dist= GetDefault(WsGapDist)


RecordFunctionOn
Stat= RecordDescr("DEFAULTS: Draft defaults")
V1= FreeParameter("Text height",Theight)
Stat=SetDefaults(WsTextHeight,V1)
V2= FreeParameter("Text width",Twidth)
Stat=SetDefaults(WsTextWidth,V2)
V3= FreeParameter("Text angle",Tangle)
Stat=SetDefaults(WsTextAngle,V3)
V4= FreeParameter("Text slant",Tslant)
Stat=SetDefaults(WsTextSlant,V4)
V5= FreeParameter("Arrow height",Aheight)
Stat=SetDefaults(WsArrowHeight,V5)
V6= FreeParameter("Arrow width",Awidth)
Stat=SetDefaults(WsArrowWidth,V6)
V7= FreeParameter("Arrow style",Astyle)
Stat=SetDefaults(WsArrowStyle,V7)
V8= FreeParameter("Dimension scale",Dim_scale)
Stat=SetDefaults(WsDimensionScale,V8)
V9= FreeParameter("Places after",Places_after)
Stat=SetDefaults(WsPlacesAfter,V9)
V10= FreeParameter("Angle places ",Angle_places)
Stat=SetDefaults(WsAPlacesAfter,V10)
V11= FreeParameter("Radius places ",Radius_places)
Stat=SetDefaults(WsRPlacesAfter,V11)
V12= FreeParameter("Extend dist ",Extend_dist)
Stat=SetDefaults(WsExtendDist,V12)
V13= FreeParameter("Gap dist ",Gap_dist)
Stat=SetDefaults(WsGapDist,V13)

RecordFunctionOff
CloseVarRecord

Leave:!
LowerSelectBox
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
