;;;===================================================================;
;;; FIND-LINE-TYPE ;
;;;-------------------------------------------------------------------;
;;; This searches a linetype collection object and determines if ;
;;; the linetype is present in the collection. ;
;;; ;
;;; Note: l-obj is a local variable within the scope of the vlax-for ;
;;; function because it is used within a "for" expression ;
;;; ;
;;; Arguments: line-type = A string which denotes the linetype ;
;;; to search for in the line-type-collection ;
;;; argument. ;
;;; line-type-collection = A vla collection object which ;
;;; contains the current linetypes ;
;;; loaded in ACAD. ;
;;; ;
;;; Returned Value: If the linetype is found a vla linetype object ;
;;; is returned such as: ;
;;; #<VLA-OBJECT IAcadLineType 03fe0b00> ;
;;; (If the linetype search fails this function ;
;;; returns n(defun TxtStr (x) ;
;;; ;
;;; Usage: (find-line-type "CENTER" "acad.lin") ;
;;;===================================================================;
)
)
res
)
;;;===================================================================;
;;; LOAD-LINE-TYPES ;
;;;-------------------------------------------------------------------;
;;; This function loads a linetype in to the drawing ;
;;; ;
;;; Required Functions: find-line-type ;
;;; ;
;;; Arguments: line-type = A string which denotes the LT to load ;
;;; file-name = A string which denotes the LT file to ;
;;; which to load the requested linetype ;
;;; ;
;;; Returned Value: A vla linetype object objects such as: ;
;;; #<VLA-OBJECT IAcadLineType 03fe0b00> ;
;;; ;
;;; Usage: (load-line-types "CENTER" "acad.lin") ;
;;;===================================================================;
(defun load
-line
-types
(line
-type file
-name
/ tmp res
) ;; set and the current
;; linetype collection
)
res
;; load the linetype
;; since the vla-load function returns nil
;; we force the following function to test if
;; the load was successful. If success the
;; return the vla linetype object
;; Nothing was loaded so we return nil
nil
) ;; _test to see if the line was loaded
) ;; evaluate when the linetype is not loaded in acad
) ;; end if for check if linetype is loaded
nil
) ;; end if for various calls to ACAD
)