Author Topic: Complex Linetypes  (Read 3946 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Complex Linetypes
« on: April 14, 2005, 05:06:15 AM »
Is it possible to insert an attribute into a custom linetype?
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

MikePerry

  • Guest
Complex Linetypes
« Reply #1 on: April 14, 2005, 05:09:08 AM »
Hi

Not that I am aware of (but that doesn't mean a thing).

Have a good one, Mike

Dent Cermak

  • Guest
Complex Linetypes
« Reply #2 on: April 14, 2005, 01:30:13 PM »
There is if your "attribute" is text or a block. If that is the case say 'yes" and I will tell you how.

whdjr

  • Guest
Complex Linetypes
« Reply #3 on: April 14, 2005, 02:07:39 PM »
I don't currently use one but if the "how" is cool enough I might find one to make, so please share.

Dent Cermak

  • Guest
Complex Linetypes
« Reply #4 on: April 14, 2005, 05:12:46 PM »
I use a dashed linetype for my underground utilities with a label "UE' or "UC" to identify if it is electric or communications. I create a layer for UE, set the linetype to dashed2. I set that as my current layer. then I go under "LINES"....."SPECIAL LINES'........"LINE WITH TEXT"  ........pick my beginning point, it asks for text to insert, I tell it "UE" and start drawing my line. If you have a block to insert on the line, use the " LINE WITH BLOCK" option. it does break the line for the text or block, so if you want a continuous compound line you're still screwed.

MikePerry

  • Guest
Complex Linetypes
« Reply #5 on: April 14, 2005, 05:39:07 PM »
Quote from: Dent Cermak
then I go under "LINES"....."SPECIAL LINES'........"LINE WITH TEXT"  ........pick my beginning point, it asks for text to insert, I tell it "UE" and start drawing my line.
Hi

Is this within vanilla AutoCAD?

If yes, can you please explain further as I'm just not seeing it.

Have a good one, Mike

Dent Cermak

  • Guest
Complex Linetypes
« Reply #6 on: April 14, 2005, 09:04:29 PM »
As far as I can tell there's nothing in vanilla AutoCad. I do not see haw anyone accomplishes anything in plain Autocad. I need my tools!!

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Complex Linetypes
« Reply #7 on: April 15, 2005, 10:02:09 AM »
I believe that it is possible if you create the linetype on the fly, as long as the text width would reamin the same?

Never tried it but it doesn't seem like it would take much.

Code

Prompt for text
Create and save .Lin def
load linetype
draw line
clean / delete .lin def (if so desired)
exit

/Code
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

grush

  • Guest
Complex Linetypes
« Reply #8 on: April 15, 2005, 12:18:34 PM »
No attributes here, just regular text in a line type.

Code: [Select]
;================================================================================
;D. Marker 10-08-1999
;================================================================================
(defun c:ltxt ()
  (setvar "cmdecho" 0)
  (setq v:clayer (getvar "clayer"))
  (setq v:expert (getvar "expert"))
  (if (not v:linet)
    (setq v:linet "XX")
  ) ;if
  (setq v:linet_x (getstring (strcat "\n \n \nEnter line text: <" v:linet ">")))
  (if (/= v:linet_x "")
    (setq v:linet (strcase v:linet_x))
  ) ;if
  (setq v:linet (strcase v:linet))
  (setvar "expert" 4)
  (setq v:linet_l (strlen v:linet))
  (setq v:linet_w (rtos (* v:linet_l 0.1) 2 1))
  (setq v:lt_file "c:\\temp\\lt_temp.lin")
  (setq v:lt_var1 (open v:lt_file "w"))
  (setq v:lt_textl1 (strcat "*" v:linet "," v:linet "----" v:linet "----" v:linet
                          "----" v:linet
                    ));setq
  (setq v:lt_textl2 (strcat "A,.5,-.2,[" (chr 34) v:linet (chr 34)
                          ",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-" v:linet_w
                    ));setq
  (setq v:lt_var2 (write-line v:lt_textl1 v:lt_var1))
  (setq v:lt_var3 (write-line v:lt_textl2 v:lt_var1))
  (close v:lt_var1)
  (command "-linetype" "l" v:linet v:lt_file "")
  (setvar "expert" v:expert)
  (command ".celtype" v:linet)
  (princ (strcat "\n \n \nCurrent Entity linetype set to:" v:linet))
  (princ)
  (setq v:pnt1 (getpoint "\nPick start point:"))
  (command "pline" v:pnt1)
  (while (setq v:pt (getpoint (getvar "lastpoint")
                            "\nNext point or <Return to terminate>:"
                    ));getpoint, setq
    (command v:pt)
  ) ;while
  (command)
  (command)
  (setvar "celtype" "bylayer")
  (princ)
  (princ "\n \nLine-Text terminated.  Linetype set to BYLAYER:")
  (princ)
) ;defun
(princ)
(princ " Line-Text Loaded...")
(princ)
(princ (strcat "\n \n" (chr 34) "LTXT" (chr 34) " to execute:"))
(princ)


Hope this helps...
Pete

PDJ

  • Guest
Complex Linetypes
« Reply #9 on: April 15, 2005, 12:50:38 PM »
Will this work for ya??

Code: [Select]
*HOT_WATER_SUPPLY,Hot water supply ---- HW ---- HW ---- HW ----
A,.5,-.2,["HW",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-.2
*GAS_LINE,Gas line ----GAS----GAS----GAS----GAS----GAS----GAS--
A,.5,-.2,["GAS",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-.2


I've had these for years it seems..   Didn't know it was that difficult, or maybe I'm readin into this..

pmvliet

  • Guest
Complex Linetypes
« Reply #10 on: April 15, 2005, 01:19:48 PM »
Hudster would like one linetype like Hot Water or Gas line, that he could change the attribute to get different variations without creating each variation as a unique linestyle. I myself would think this would be a good idea.

hudster

  • Gator
  • Posts: 2848
Complex Linetypes
« Reply #11 on: April 15, 2005, 01:26:19 PM »
Yeah thats exactly what I'm after.

At the moment I have a line type file, with all the lines I need in it, but it would be better if I didn't have to create a new linetype each time.

Its a pain getting it to look right, always takes a wee bit of fiddling, even using the afralisp text placement calculation.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue