Jump to content

Recommended Posts

Posted

Hi All,

my client has supplied a .lin file and I want to load in autocad how could I load..I know only way to load lines type is appload but once I load like this appearing on my cad files but not appearing on other systems what can I do to appear line types on all systesm of my group.

Posted

I have no idea how to use LISP to load linetypes but from the command line you type

-LINETYPE
LOAD
<name of file>

Posted

Your lisp routine would have to include the path to the linetype file you want your users to load. I assume this would be on your network where the rest of your shared files are stored.

Posted

A lisp version Note the .lin file has been included in the "support files" list via CONFIG like Remark save to your server, else to one directory on every pc.

 

(setq  doc (vla-get-activedocument (vlax-get-acad-object)))
(defun loadLinetype (doc LineTypeName FileName)
 (if (and
       (not (existLinetype doc LineTypeName))
       (vl-catch-all-error-p
         (vl-catch-all-apply
           'vla-load
           (list
             (vla-get-Linetypes doc)
             LineTypeName
             FileName
           )
         )
       )
     )
   nil
   T
 )
)
(defun existLinetype (doc LineTypeName / item loaded)
 (vlax-for item (vla-get-linetypes doc)
   (if (= (strcase (vla-get-name item)) (strcase LineTypeName))
     (setq loaded T)
   )
 )
)
;load missing linetypes
;;; returns: T if loaded else nil
(loadLinetype doc "Fence" "custom.lin")
(loadLinetype doc "Tree" "custom.lin")

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...