Luiz A M Vieira Posted July 24, 2021 Share Posted July 24, 2021 (edited) Good morning Good afternoon Good night Dear confreres of the auto-lisp autodesk community. My name is Luiz Antonio, my email is lamvieira@yahoo.com and my whatsapp is +55 31 99996 3271, I'm in need of a routine to load line typed in visual lisp. Type ;Program to draw an Arc Gate through: ;(command "layer" "make" "Layer Name" "color'" "color" "Layer Name" "") ;(command ._linetype" "_load" "center2" "acadiso.lin" " ") (Default c:port() ; Reading:- Will read the values (setq Lp (getreal "\nPort width : ")) (setq Ap (getreal "\nHeight of port : ")) (setq pt0 (getpoint "\nLower Center Point : ")) ; Calculations:- Will calculate other points needed for the drawing (setq Lp1 (/Lp 2)) (setq X (/pi 2)) (setq At (+ Ap Lp1)) (setq pt1 (polar pt0 0 Lp1)) (setq pt2 (polar pt1 X Ap)) (setq pt4 (polar pt0 pi Lp1)) (setq pt3 (polar pt4 X ap)) (setq pt5 (polar pt0 (/(* 3 pi) 2)50)) (setq pt7 (polar pt2 0 50)) (setq pt8 (polar pt3 pi 50)) (setq pt6 (polar pt0 X (+ At 50))) ;Drawing:- Change layer and draw (command "layer" "m" "Outline""color" "4" "Outline" "") (command "line" pt2 pt1 pt4 pt3 "" "arc" "" pt2 ; continuous arch ); Command 1 (command "_linetype" "_load" "acadiso.lin""center2" "") (command "layer" "m" "Centerline" "color" "2""Centerline" "") (command "line" pt5 pt6 "" "line" pt7 pt8 "" ); Command 2 ; Quotation:- Will quote the drawing (command "layer" "m" "Dimensions" "color" "1" "Dimensions" "") (command "dim" "hor" pt4 pt1 (polar pt1 (/(* 3 pi)2) 200) (rtos (distance pt4 pt1) 2 0) "see" pt1 pt2 (polar pt1 0 200) (rtos (distance pt1 pt2) 2 0) (command "zoom" "all") ;;;;;"exit" );End of Rtos ); End of Program Edited July 25, 2021 by CADTutor Code moved to code block Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 26, 2021 Share Posted July 26, 2021 This worked for a custom linetype. Note the name is case sensitive "tree" will not work must match linetype name. (command "-linetype" "_load" "TREE" "D:\\BIGAL\\lisp\\custom.lin" "") Quote Link to comment Share on other sites More sharing options...
tombu Posted July 26, 2021 Share Posted July 26, 2021 Like BIGAL I'd use "CENTER2" same as it's defined in "acadiso.lin". "acadiso.lin" vs "acad.lin" are selected automatically depending on the system variable measurement in the current drawing. Measureinit is the system variable for new drawings. Load Linetypes - Lee Mac - http://www.lee-mac.com/loadlinetype.html Attempts to load a list of linetypes from any .lin files found in the support path. Excludes known metric & imperial definition files based on the value of MEASUREMENT lts - [lst] List of linetypes to load rdf - [bol] If T, linetypes will be redefined from file if already loaded Returns: [bol] T if all linetypes are loaded successfully, else nil Macro: ^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("CENTER2") T) I like that it can be used to load multiple linetypes at the same time. Macro: ^P(or LM:LoadLinetypes (load "LoadLinetypesV1-3.lsp"))(LM:LoadLinetypes '("HIDDEN" "DOT" "PHANTOM") T) Macro: ^P(LM:LoadLinetypes '("ArialDOT" "ArialDOT2" "ArialDOTX2" "ArialARROW") T) Macro: ^P(LM:LoadLinetypes '("BARBWIRE_1" "BARBWIRE_2" "CHAINLINK_1" "CHAINLINK_2" "GUARD_L" "GUARD_R" "STOCKADE_1" "STOCKADE_2" "STONEWALL" "TREELINE_L" "TREELINE_R") T) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.