Creation of new linetypes?

I've never created a new linetype. Can anyone here explain the process to me? I looked on Youtube, but all the tutorials I found were published in foreign languages or by people with foreign accents. I have some hearing problems and it makes it even harder to follow.

Comments

  • Anthony Apostolaros
    edited July 2018

    There's an illustration of what the code in a simple linetype definition means at http://www.thecadmasters.com/2013/01/10/creating-custom-autocad-linetypes/

    It always starts with "A" for some reason, and then a positive number is a length of line, a negative number is a length of no line, and a zero is a dot.

    The attached file is an illustration of my understanding of what the code in a complex linetype definition means. It was derived by trial and error, so it could contain mistakes.

    I don't know how to use shapes in a complex linetype definition, but I know that's another option.

  • Why do you choose video tutorials? There are plenty of 'classic' web pages with explanations.

  • @Anthony Apostolaros said:

    It always starts with "A" for some reason, and then a positive number is a length of line, a negative number is a length of no line, and a zero is a dot.

    Thanks Anthony. So only lines and dots? No characters, like "\" allowed?

  • @Roy Klein Gebbinck said:
    Why do you choose video tutorials? There are plenty of 'classic' web pages with explanations.

    When I was at Rensselaer Polytechnic learning electronics, all my instruction came out of hard core. dull, boring text books. Many didn't even have line drawings, let alone pictures, to explain complex subjects. Other than physics and chemistry, we didn't have any labs in the first two years. No chance to touch or experience anything. No chance to re-enforce what you learned in the book . There were no personal computers or internet in those days, and the professors didn't make themselves available to struggling students like me. I pretty much lost interest in the field. I also developed an aversion to text books. I'm 64 now, suffering from multiple health problems including advanced Lyme disease. I've got a host of neurological problems including facial paralysis, memory loss, narcolepsy, etc. At the same time, I'm also the sole caregiver for my 93 year old mother. I work 8 hours a day and go home to take care of her. So excuse me if I go looking for a video to make my learning a little quicker and enjoyable.

  • @Jim Canale said:

    .... So only lines and dots? No characters, like "\" allowed?

    Yes, characters are allowed. See the rest of my post, and the attachment.

  • Jim,

    I use Ron's code at http://cadtips.cadalyst.com/2d-operations/create-custom-linetype. The definition of a linetype is straight forward and they are not hard to hand code, but Ron's routine is easier.

    I just created a test linetype with text that includes text. The code produced is

    *TEST,---OHE---
    A,2.0,-0.229516806722689,["OHE",enco_bold,S=0.375,R=0.0,X=-0.0,Y=-0.187672657645735],-1.42174369747899

    "*" starts the linetype
    "TEST" is the linetype name
    "---OHE---" is the demo that shows in the linetype dropdown
    "A" starts the definition
    "2.0" is a solid line 2.0 units long. Linetypes always start and end with a solid line. Bricscad extends or shortens the line
    segments at the ends as required to adapt the linetype to the curve. All line segments other than the ends will be
    at the specified lengths.
    "-0.2295..." is the gap before the text. Gaps use negative numbers.
    "-1.4217..." is the gap after the text. Note that the gap after does not match the gap before. This is because the characters in
    a font include whitespace to provide gaps between the characters. In most cases the whitespace is predominantly
    on the right.

    The part in square brackets is the text definition. It includes the text string and the font. S is size. R is rotation. The X and Y values are the text offset. SHX fonts use left baseline as the insertion point so the text needs to be offset to have it appear to be centered vertically in the line.

    For linetypes that will be curved I generally code by hand and I insert the characters individually. This tends to keep the text flowing with the curve of the line. With multi-character text strings the text is anchored at the Left justification point and the text will be in a straight line so it will not follow the curvature of the line. It is possible to play with gaps and do both X and Y offsets to effectively center justify the text. This works well for single letters and for short text strings, although with multi-character strings the middle-center of the text will probably not lie on the curve.

    I don't recommend using 0.0 for a dot. The result will be small enough you probably won't see it when it prints. Making "dots" a bit longer prints better.

    Hope that helps.

  • @H Martin Shoemaker said:

    Thank you Martin. Right now, my boss pulled me off my machine to do some building maintenance. When I get back I will follow your procedure.

  • so I entered the text exactly after the A, and the message I get back on the command line is the Linetype pattern contain invalid characters. Whats up.. is there something I am doing wrong?

  • Express Tools for BricsCAD includes a utility to create linetypes.

    Regards,
    Jason Bourhill
    CAD Concepts

  • @H Martin Shoemaker said:

    I apologize for my absence from the thread I started. First it was changes at work. Then the death of my mother. Now, it's my declining health. I don't know how much time I will be able to devote to this forum in the future. I just know I have to pare down my already minimal participation. I wish everyone well.

  • Wishing you well also. Age tends to cause us to focus on what is important. As time has passed, learning new stuff on the CAD program has definitely gone further down the list of priorities for myself.

    -Joe

  • @Joe Dunfee said:
    Wishing you well also. ..
    -Joe

    Thanks Joe. You've been very helpful to me since I started learning this stuff. Patient too. I'll still be around the site from time to time, but both my employers business and my health seem to be failing fast, so I don't know for how long. My best to you, too.