Jump to content

Recommended Posts

Posted

I want to extract the linetype name and layer from the lines I pick, so that way I can label the lines using the linetype or layer of that line. I am using 2011.

Posted

You don't want to do a LIST or click on the line and check its PROPERTIES prior to labeling it?

Posted

Wait, so you want to label the line with the layer and linetype, or you just want the label on the same layer?

Posted

I have lisps that select the lines already and put labels on them for the lengths. I was trying to change it. Instead of labeling with the length use the linetype and or use layer name to label the lines. I thought that

(setq lt (vla-get-???????)) would work but I think I am using it wrong.

Posted
(setq ent (car (entsel)))
(setq data (entget ent))
(setq layer (cdr (assoc 8 data)))
(setq ltype (cdr (cond ((assoc 6 data)) ; object level linetype
                      ((assoc 6 (tblsearch "LAYER" layer))) ; layer level linetype
                )
           )
)

Posted

For VLISP, it would be vla-get-layer and vla-get-linetype

Posted

Thanks alanjt I got it to work using linetype.

Another question.

6 = linetype

8= layer

is there something for thickness of the line?

Posted

Thank you. I even booked marked it. I got the info from there.

Posted
Thank you. I even booked marked it. I got the info from there.

You're welcome.

Posted
I want to extract the linetype name and layer from the lines I pick, so that way I can label the lines using the linetype or layer of that line. I am using 2011.

 

 

*********labeling layername on feature**********
(defun c:as ()
 (setq aa (car (entsel "\n Select Enity to label as layer name")))
 (setq tt1 (getpoint "/n specify point location for text"))
 (setq bb (entget aa))
 (setq cc (Assoc 8 bb))
 (setq dd (cdr cc))
 (command "text" tt1 "45" "0" dd)
)

 

repectively, u can modify the code for Linetype labelling using (6 . "Continuous"). And text Height u can change in this code. No Copyright ! ;)

:)

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