Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help creating a custom linetype

13 REPLIES 13
Reply
Message 1 of 14
Anonymous
1510 Views, 13 Replies

Help creating a custom linetype

Can anyone tell me how to create a linetype that looks like the image below. Any thoughts.

 

linetype.jpg

Tags (1)
13 REPLIES 13
Message 2 of 14
mid-awe
in reply to: Anonymous

What information can you share about the linetype scale? Do you have a dwg with this line in it?

I make linetypes in my sleep & I'm happy to help.
Message 3 of 14
mid-awe
in reply to: Anonymous

Ok, well, looking a little closer it is obvious that you'll need to do this one as a multiline.
Message 4 of 14
CADaSchtroumpf
in reply to: Anonymous

Hi,

 

Before, you must create TextStyle.

You can use this for it.

(if (not (tblsearch "STYLE" "TRANSPORT"))
  (entmake
    '(
      (0 . "STYLE")
      (5 . "40")
      (100 . "AcDbSymbolTableRecord")
      (100 . "AcDbTextStyleTableRecord")
      (2 . "TRANSPORT")
      (70 . 0)
      (40 . 0.0)
      (41 . 1.0)
      (50 . 0.0)
      (71 . 0)
      (42 . 1.0)
      (3 . "ARIAL.TTF")
      (4 . "")
     )
  )
)

 After this, save your line type in TRANSPORT.LIN with définition:

*transport,altern
A,0,["\U+25A0",transport,S=1,R=0,X=-0.595,Y=-0.3215],-0.6435,["\U+25A1",transport,S=1,R=0,X=-0.595,Y=-0.3215],-0.6435

Then load the file with "_LINETYPE"

Message 5 of 14
Anonymous
in reply to: CADaSchtroumpf

Cadastroumph,

 

I tried the information that you provided and when I try to load the linetype it says there is a bad definition of transport at line 7 of the file.

 

What needs to be done to fix that so it will work?

Message 6 of 14
CADaSchtroumpf
in reply to: Anonymous


splautz44 a écrit :

Cadastroumph,

 

I tried the information that you provided and when I try to load the linetype it says there is a bad definition of transport at line 7 of the file.

 

What needs to be done to fix that so it will work?


Badly copied? I attach the file

 

For the code lisp, copy and paste directly in command line before load LIN file

Message 7 of 14
Anonymous
in reply to: Anonymous

I got it to work. I would like to make the line thinner. What diminsions do I have to change in the .lin file to make it thinner?

Message 8 of 14
Anonymous
in reply to: Anonymous

Also, the endpoint of the line is not correct. The line stops short of the endpoint.

Message 9 of 14
CADaSchtroumpf
in reply to: Anonymous


splautz44 a écrit :

I got it to work. I would like to make the line thinner. What diminsions do I have to change in the .lin file to make it thinner?


Isn't possible, try to find another character in table, here is a white & black square

Message 10 of 14
CADaSchtroumpf
in reply to: Anonymous


splautz44 a écrit :

Also, the endpoint of the line is not correct. The line stops short of the endpoint.


It is typically with all linetypes customised

Message 11 of 14
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

I got it to work. I would like to make the line thinner. What diminsions do I have to change in the .lin file to make it thinner?


If you mean the overall width of the resulting linetype, apply a Linetype Scale to vary the size.  If you mean the thickness of the side-edge parts where it's not filled in solid, relative to the overall width, that's what you can't vary if you're using a character in a TrueType font.  But you could if you make it by Shapes embedded in the linetype, in which case you would adjust the thickness of the side line elements with pen width, e.g. by the color of the resulting objects if you use color-based lineweights in plotting/printing.

 

Also, do you ever need to use this on curves?  If so, a Shape-based linetype definition, using a few insertions in series of a Shape consisting of only top and bottom edges, followed by a few insertions of a solid-filled Shape, would get closer to following curvature, though it would still be in segmented short straight pieces, which would be more or less obvious depending on how tight the curvature is.

Kent Cooper, AIA
Message 12 of 14
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

Also, the endpoint of the line is not correct. The line stops short of the endpoint.


To elaborate on CADaStroumph's reply:  It is part of the nature of all non-continuous linetypes that they can only put in the non-continuous elements in complete cycles of the linetype definition.  Any length of drawn elements beyond whole multiples of the linetype definition cycle will always be filled in with continuous end segments.  If whatever you're drawing allows, you can minimize that by changing the lengths of things [whether by dragging grips or via commands such as Lengthen/Trim/Extend/Break] to "tighten them down" relative to the linetype definition cycle, but obviously that's not always an option.  If you can't do that, and can't live with the continuous end parts, you might need to do something like use Mline for the sides, and something else for the dashed middle parts, which you could presumably adjust the length of for the appearance you want.  But of course that would then involve two separate entities overall, and they could behave in ways you won't like if [for instance] you Stretch them in a direction not parallel to their end direction.

Kent Cooper, AIA
Message 13 of 14
Kent1Cooper
in reply to: Anonymous

There's another similar thread, here, that doesn't have just what you're looking for, but will at least give you more of a taste of a few possible approaches, and discusses some of the ramifications of them.

Kent Cooper, AIA
Message 14 of 14
Kent1Cooper
in reply to: Kent1Cooper


@Kent1Cooper wrote:
.....

Also, do you ever need to use this on curves?  If so, a Shape-based linetype definition, using a few insertions in series of a Shape consisting of only top and bottom edges, followed by a few insertions of a solid-filled Shape, would get closer to following curvature, though it would still be in segmented short straight pieces, which would be more or less obvious depending on how tight the curvature is.


Such as the attached.  I made the Shapes overlap a little, to accommodate a certain degree of curvature without gaps -- you can adjust the spacing if you like, or the number of OPEN and CLOSED Shapes in series.  I also set it up to be closed at the ends, but if that doesn't matter, you could start with the OPEN ones or the CLOSED ones, or however you prefer it to come out.  In a drawing with a LTSCALE System Variable setting of 1, entities with a Linetype Scale of 1 will be 1 drawing unit wide.  Use a plotting lineweight sufficient to make the CLOSED ones fill in solidly.  Fix the Shape-file name in the Linetype definition to whatever you put it in, and adjust the Shape number if necessary, etc.

Kent1Cooper_0-1674133333434.png

 

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost