Jump to content

Recommended Posts

Posted

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!

Posted

Hi,

The Linetype name must be string "HIDDEN" besides that it has to be loaded into your current opened drawing otherwise it will error.

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

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

I am not sure about your variables p1 & p5 but as I described earlier the linetype name must be string like this.  '(6 . "HIDDEN")

  • Thanks 1
Posted (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 by StevJ
Posted

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

 

 

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