j_spawn_h Posted November 10, 2011 Posted November 10, 2011 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. Quote
ReMark Posted November 10, 2011 Posted November 10, 2011 You don't want to do a LIST or click on the line and check its PROPERTIES prior to labeling it? Quote
alanjt Posted November 10, 2011 Posted November 10, 2011 Wait, so you want to label the line with the layer and linetype, or you just want the label on the same layer? Quote
j_spawn_h Posted November 10, 2011 Author Posted November 10, 2011 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. Quote
alanjt Posted November 10, 2011 Posted November 10, 2011 (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 ) ) ) Quote
alanjt Posted November 10, 2011 Posted November 10, 2011 For VLISP, it would be vla-get-layer and vla-get-linetype Quote
j_spawn_h Posted November 10, 2011 Author Posted November 10, 2011 Thanks alanjt I got it to work using linetype. Another question. 6 = linetype 8= layer is there something for thickness of the line? Quote
alanjt Posted November 10, 2011 Posted November 10, 2011 Thanks alanjt I got it to work using linetype.Another question. 6 = linetype 8= layer is there something for thickness of the line? This should help: http://docs.autodesk.com/ACD/2011/ENU/filesDXF/WSfacf1429558a55de185c428100849a0ab7-5f35.htm Quote
j_spawn_h Posted November 10, 2011 Author Posted November 10, 2011 Thank you. I even booked marked it. I got the info from there. Quote
alanjt Posted November 10, 2011 Posted November 10, 2011 Thank you. I even booked marked it. I got the info from there. You're welcome. Quote
sanrajbhar Posted November 11, 2011 Posted November 11, 2011 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 ! 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.