;; Parse Numbers - Lee Mac
;; Parses a list of numerical values from a supplied string.
;; Set Dynamic Block Property Value - Lee Mac
;; Modifies the value of a Dynamic Block property (if present)
;; blk - [vla] VLA Dynamic Block Reference object
;; prp - [str] Dynamic Block property name (case-insensitive)
;; val - [any] New value for property
;; Returns: [any] New value if successful, else nil
;; Start Undo - Lee Mac
;; Opens an Undo Group.
;; End Undo - Lee Mac
;; Closes an Undo Group.
;; Readable - Lee Mac
;; Returns an angle corrected for text readability.
(defun LM:readable
( a
) ((lambda ( a
) (if (and (< (* pi
0.5) a
) (<= a
(* pi
1.5))) (LM:readable
(+ a pi
)) a
)) (rem (+ a pi pi
) (+ pi pi
))))
;; Get Attribute Value - Lee Mac
;; Returns the value held by the specified tag within the supplied block, if present.
;; blk - [vla] VLA Block Reference Object
;; tag - [str] Attribute TagString
;; Returns: [str] Attribute value, else nil if tag is not found.
;; Set Attribute Value - Lee Mac
;; Sets the value of the first attribute with the given tag found within the block, if present.
;; blk - [vla] VLA Block Reference Object
;; tag - [str] Attribute TagString
;; val - [str] Attribute Value
;; Returns: [str] Attribute value if successful, else nil.
;; Active Document - Lee Mac
;; Returns the VLA Active Document Object
(defun lyrmk
(Nme Col lTyp lWgt Plt trns dsc
/ lay lyrs cmd
) ;lee mac ;http://www.cadtutor.net/forum/showthread.php?36882-Check-create-layer-issue-in-Lisp&p=243520&viewfull=1#post243520
;(mdfy)
; (and lWgt (vla-put-LineWeight entVL (eval (read (strcat "acLnWt" lWgt)))))
(and lWgt
(vl-cmdf "_.-layer" "_LWeight" lWgt Nme
"")) (vl-cmdf "_.-layer" "_TR" trns Nme
"") )
;(mdfy)
; (and lWgt (vla-put-LineWeight entVL (eval (read (strcat "acLnWt" lWgt)))))
(and lWgt
(vl-cmdf "_.-layer" "_LWeight" lWgt Nme
"")) (vl-cmdf "_.-layer" "_TR" trns Nme
"")))