;FILE NAME: DRAFT-MVD_CAD-Plotting.pen
;
;Updated By: Greg Porycky 06/26/2008
;This is table based on AEC Stds ver 3.0
;--------------------------------------------------------------------------

units=inches

;--------------------------------------------------------------------------
;  Below starts the definition of solid line thicknesses based on
;  AEC CADD Stds Release 3.0 Table 3-1 
;--------------------------------------------------------------------------
; Line Thickness	(mm)		(in.)		MicroStation Line Weight
;  					
; Fine 			0.18mm	0.007"	wt = 0
; Thin 			0.25mm	0.010"	wt = 1
; Medium 		0.35mm	0.014"	wt = 2
; Wide 			0.50mm	0.020"	wt = 3
; Extra Wide		0.70mm	0.028"	wt = 5
; XX Wide 		1.00mm	0.040"	wt = 7
; XXX Wide		1.40mm	0.055"	wt = 10
; XXXX Wide		2.00mm	0.079"	wt = 15
;--------------------------------------------------------------------------
;--------------------------------------------------------------------------
;  Below starts the definition of Standard Line Styles
;  AEC CADD Stds Release 3.0 Chapter 3 Table 3-2 (Standard Line Types/Styles)
;--------------------------------------------------------------------------
; Description			Example		Microstion Designator
; Continuous			_________________		0
; Dotted			.................		1
; Dashed			-----------------		2
; Dashed spaced			- - - - - - - - -		3
; Dashed dotted			-.-.-.-.-.-.-.-.-		4
; Dashed doubled-dotted		-..-..-..-..-..-		6
; Dashed triple-dotted		-...-...-...-...-		7
;--------------------------------------------------------------------------

IF (IP_xSIZE_NUM>17) Then
  Thickness= .007 + .0048 * weight
if (style .eq. 1) then
	style=(.02,.10)
	else if (style .eq. 2) then
	style=(.06,.07)
	else if (style .eq. 3) then
	style=(.16,.07)
	else if (style .eq. 4) then
	style=(.30,.07,.05,.07)
	else if (style .eq. 6) then
	style=(.35,.07,.05,.07,.05,.07)
	else if (style .eq. 7) then
	style=(.35,.08,.06,.08,.06,.08,.06,.08)

endif

else Thickness=.0035 + .0024 * weight
if (style .eq. 1) then
	style=(.01,.05)
	else if (style .eq. 2) then
	style=(.03,.035)
	else if (style .eq. 3) then
	style=(.08,.035)
	else if (style .eq. 4) then
	style=(.15,.035,.025,.035)
	else if (style .eq. 5) then
	style=(.045,.03)
	else if (style .eq. 6) then
	style=(.175,.035,.025,.035,.025,.035)
	else if (style .eq. 7) then
	style=(.175,.04,.03,.04,.03,.04,.03,.04)
	endif
ENDIF
;--------------------------------------------------------------------------
; All Solid lines
;--------------------------------------------------------------------------
;changed 201-256 to 201-254 on following line - jcf
if (color.IN.0-7,9-55,57-119,121-167,169-199,201-254) then
	color=(0,0,0)
	PRIORITY=0
endif
;--------------------------------------------------------------------------
;  Below starts the definition of Screened Colors based on percentage
;  AEC CADD Stds Release 3.0 Table 3-4 (Screened Colors)
;--------------------------------------------------------------------------
; Screen	Gray Scale Ratios (RGB), percent
; 60%		102,102,102
; 50%		128,128,128
; 40%		153,153,153
; 30%		179,179,179
; 20%		204,204,204
;--------------------------------------------------------------------------
; changed priorities such that darker screen colors would always be 
; plotted on top of lighter ones - jcf
;--------------------------------------------------------------------------

if (color==8) then
    color=(102,102,102)
	PRIORITY=-50
endif
if (color==200) then
    color=(128,128,128)
	PRIORITY=-51
endif
if (color==168) then
    color=(153,153,153)
	PRIORITY=-52
endif
if (color==120) then
    color=(179,179,179)
	PRIORITY=-53
endif
if (color==56) then
    color=(204,204,204)
	PRIORITY=-54
endif
;--------------------------------------------------------------------------
IF (TYPE .EQ. TEXT) THEN
   MIDLINE_JOINT = CIRCLE
ELSE 
   MIDLINE_JOINT = MITER
ENDIF


IF (TYPE .EQ. TEXT) THEN
   ENDCAP = CIRCLE
ELSE
   ENDCAP = EXTEND
ENDIF


IF (TYPE .EQ. TEXT) THEN
   ;STYLE=0
   PRIORITY=100
   ;AREA_FILL = TRUE
   ;FILL_COLOR = (255,255,255)
   ;BOUNDARY_DISPLAY = true
   ;BOUNDARY_COLOR = (255,255,255)

ENDIF
;--------------------------------------------------------------------------

IF (TYPE .IN. 87,88,90) THEN
 	PRIORITY = -100
ENDIF

;--------------------------------------------------------------------------
; Text substitution lifted from MVR's pen table
;--------------------------------------------------------------------------
;put name date and time on plot

if (characters .eq. '$$$$SYTIME$$$$$$$$$$') then
  characters=SYTIME
endif

if (characters .eq. '$$$$$DGNSPEC$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$') then
  characters=DGNSPEC
endif

if (characters .eq. 'auto_short_design') then
  characters=ip_short_design
endif

if (characters .eq. 'auto_sytime') then
  characters=sytime
endif

if (characters .eq. 'auto_username') then
  characters=username
endif

if (characters .eq. 'auto_design') then
  characters=ip_design
endif

if (characters .eq. 'auto_scale') then
  characters=ip_short_scale
endif

if (characters .eq. 'auto_color_table') then
  characters="Color table Used: " + ip_color_table
endif

if (characters .eq. 'auto_levels') then
  characters="Levels turned on in plot: " + ip_levels
endif

if (characters .eq. 'auto_model') then
  characters="Model used for plot: " + ip_model
endif

if (characters .eq. 'auto_pen_table') then
  characters="Pen table used: " + ip_pen_table
endif

if (characters .eq. 'auto_queue') then
  characters="Queue used: " + ip_queue
endif

if (characters .eq. 'auto_dgnspec') then
  characters="Design filename: " + dgnspec
endif