Jump to content

How to change a linetype to Hidden??


danyra
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

  • Thanks 2
Link to comment
Share on other sites

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

 Share

×
×
  • Create New...