This subroutine was working great but now does not create the layer.
(defun MakeLayer
(name colour linetype lineweight willplot bitflag
description)
;; © Lee Mac 2010
;; (MakeLayer name colour linetype lineweight willplot bitflag description )
;; Specifications:
;; Description Data Type Remarks
;; -----------------------------------------------------------------
;; Layer Name STRING Only standard chars allowed
;; Layer Colour INTEGER may be nil, -ve for Layer Off, Colour < 256
;; Layer Linetype STRING may be nil, If not loaded, CONTINUOUS.
;; Layer Lineweight REAL may be nil, 0 <= x <= 2.11
;; Plot? BOOLEAN T = Plot Layer, nil otherwise
;; Bit Flag INTEGER 0=None, 1=Frozen, 2=Frozen in VP, 4=Locked
;; Description STRING may be nil for no description
;; Function will return list detailing whether layer creation is successful.
(cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbLayerTableRecord") 1
0
)
)
linetype
"CONTINUOUS"
)
)
colour
7
)
)
(if (and lineweight
(<= 0.0 lineweight
2.11)) lineweight
0.0
)
)
)
)
)
(list "AcAecLayerStandard" )
)
)
)
)
)
)
)
(setq ViewPortTrgtLyr
"G-ANNO-VPRT-NPLT") ;Change Target Layer (MakeLayer ViewPortTrgtLyr 9 "Continuous" 0.25 NIL 0 "NO PLOT VIEW PORT LINE ")