danyra Posted July 20, 2020 Posted July 20, 2020 I have this line, but I want to change it to a hidden linetype (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p5) '(62 . 2) )) So, I write like this.... but doesnt work. (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p5) '(62 . 2) '(6 . HIDDEN))) What can I do? Thanks! Quote
Tharwat Posted July 20, 2020 Posted July 20, 2020 Hi, The Linetype name must be string "HIDDEN" besides that it has to be loaded into your current opened drawing otherwise it will error. Quote
danyra Posted July 20, 2020 Author Posted July 20, 2020 2 minutes ago, Tharwat said: Hi, The Linetype name must be string "HIDDEN" besides that it has to be loaded into your current opened drawing otherwise it will error. Hello Tharwat, the linetype Hidden is already loaded in the cad file. Maybe I wrote it wrong? (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p5) '(62 . 2) '(6 . HIDDEN))) Quote
ronjonp Posted July 20, 2020 Posted July 20, 2020 1 minute ago, danyra said: Hello Tharwat, the linetype Hidden is already loaded in the cad file. Maybe I wrote it wrong? (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p5) '(62 . 2) '(6 . HIDDEN))) As Tharwat pointed out you have to quote "HIDDEN". 2 Quote
Tharwat Posted July 20, 2020 Posted July 20, 2020 I am not sure about your variables p1 & p5 but as I described earlier the linetype name must be string like this. '(6 . "HIDDEN") 1 Quote
StevJ Posted July 20, 2020 Posted July 20, 2020 (edited) If I may submit an alternative method that I've been using for years: Doesn't work on blocks. ;; Change whatever is selected to HIDDEN linetype. ;; For HIDDEN linetype, no need to preload it. ;; It will load automatically. (defun c:HH (/) (command "_.chprop" (ssget) "" "ltype" "HIDDEN" "") (princ) ); end defun Steve Edited July 20, 2020 by StevJ Quote
BIGAL Posted July 20, 2020 Posted July 20, 2020 Maybe a more universal (setq lt "hidden" col 2) (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p5) (cons 62 col) (cons 6 lt))) Quote
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.