Jump to content

load linetype without command


mstb

Recommended Posts

I know it can be confusing during drafting, but anyway worth mention is that actually you can easily load them all simultaneously by just typing LT (LINETYPE) command and then input "*" when asked for type, though you still have to point to adequate *.lin file that have definitions...

Link to comment
Share on other sites

I've used Lee's code for loading groups of linetypes in macros for years.

Make sure to load any Text Styles or shape files with shapes referenced in those definitions first in your macros as well so they will display correctly.

Link to comment
Share on other sites

Adding a few example macros from my Linetypes drop-down added to the Properties ribbon tab of my custom cuix file.

As most of us use visual lisp it's easier to add (vl-load-com) to acaddoc.lsp than adding it to every lisp or macro.

Keeping all my lin files in the same support folder as acad.lin makes accessing them easier.

Loading lin files using Lee Mac's code:

Reload Current

^C^C^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes (list(getvar "celtype")) T) 

Reload All

^C^C^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LtRedef) 

Dots

^C^C^P(or NewStyle (load "NewStyle.lsp"))(NewStyle "Arial" "arial.ttf") (or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("ArialDOT" "ArialDOT2" "ArialDOTX2" "PlusPlus") T) 

LT Curves

^C^C^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("C25" "C-25" "C50" "C-50" "TREELINE_L" "TREELINE_R") T) 

LT Fences  Walls

^C^C^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("FENCELINE1" "FENCELINE2" "FENCE" "FENCE2" "FENCE5" "RD-Fence" "FENCE-BOX" "FENCE-BOX2" "FENCE-BOX4" "FENCE-BOX8" "FENCE-DIA" "FENCE-DIA2" "FENCE-DIA4" "FENCE-HW" "FENCE-H1" "FENCE-H2" "FENCE-O" "FENCE-X" "FENCE-Alan" "FENCE-X2" "FENCE-X4" "FENCE-O2" "BARBWIRE_1" "BARBWIRE_2" "CHAINLINK_1" "CHAINLINK_2" "STOCKADE_1" "STOCKADE_2" "STONEWALL") T) 

LT Dir Arrows

^C^C^P(or NewStyle (load "NewStyle.lsp"))(NewStyle "Arial" "arial.ttf") (or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("DIRECTION" "DIRECTION2" "DIRECTION5" "DIRECTION-A" "ArialARROW" "ArialAHead" "ArialTriangle") T) 

LT Danger

^C^C^P(or NewStyle (load "NewStyle.lsp"))(NewStyle "WINGDINGS" "wingding.ttf") (or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("Danger") T) 

Creating linetypes with text with ronjonp's lisp at https://www.theswamp.org/index.php?topic=47058.msg520876#msg520876 Everyone should have this, Thanks ronjonp!

^C^C^P(or C:makelt (load "makelt.lsp"));makelt

Editing lin files:

Edit Acad.lin 

^C^C_start;acad.lin;

Edit Arial.lin

^C^C_start;Arial.lin;

Edit BOUCLES.lin

^C^C_start;BOUCLES.lin;

List all Shape Names from all loaded Shape files using ShapeNames.lsp by lido. Handy if you only have the shx file not the shp.

^C^C^P(if(not ShapeNames)(load "ShapeNames.lsp"))(ShapeNames);;

 

Code I added to bottom of Lee's LoadLinetypesV1-3.lsp for reloading all linetypes:

;Reload All Loaded Linetypes
(defun LtRedef ( / acadObj doc ltlay)
    (setq acadObj (vlax-get-acad-object)
          doc (vla-get-ActiveDocument acadObj)
    )
	(vlax-for obj (vla-get-linetypes doc)
	  (if (not (wcmatch (vla-get-name obj) "*|*,Continuous,ByBlock,ByLayer"))
		(setq ltlay (cons (vla-get-name obj) ltlay))
	  )
	)
	(LM:loadlinetypes ltlay T)
    (vla-Regen doc acActiveViewport)
)

 

Required lin, shx, shp and lsp files attached, adding Arial, wingdings and wingdings3 text styles are done with attached NewStyle.lsp

 

 

 

wingdings.lin wingdings3.lin Arial.lin boucles.lin acad.lin boucles.shp boucles.shx NewStyle.lsp

  • Like 1
Link to comment
Share on other sites

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...