• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    Contributor
    dmleves49
    Posts: 18
    Registered: ‎04-21-2011
    Accepted Solution

    Custom Linetype - Shapes

    247 Views, 10 Replies
    07-26-2012 01:41 PM

    Is it possible to create a linetype that just consists of the repeated shape? I'm trying to create railway tracks and my shape looks like this.

    Shape

    My linetype definition that ive tried is this: 

    *TRACK,Track
    A,0.0001,-1.1622,[TRACK,Track.shx]

     

    attempting to get a very small line, and then a space for my shape to fit into. This is what I get. Does anyone know the syntax to just include a repeating shape?

     

    Dale

    Line drawn using Linetype

    Please use plain text.
    *Expert Elite*
    Kent1Cooper
    Posts: 4,159
    Registered: ‎09-13-2004

    Re: Custom Linetype - Shapes

    07-26-2012 02:33 PM in reply to: dmleves49

    dmleves49 wrote:

    Is it possible to create a linetype that just consists of the repeated shape? ....

    My linetype definition that ive tried is this: 

    *TRACK,Track
    A,0.0001,-1.1622,[TRACK,Track.shx]

     

    attempting to get a very small line, and then a space for my shape to fit into. .... Does anyone know the syntax to just include a repeating shape?

    ....


    Given the way your shape must be defined relative to its starting point, put the shape insertion part before the pen-up [negative-number] designation, rather than after.  You can't entirely eliminate the short continuous-line parts at the ends -- the best you can do is adjust the overall length to minimize them.
    Kent Cooper
    Please use plain text.
    Contributor
    dmleves49
    Posts: 18
    Registered: ‎04-21-2011

    Re: Custom Linetype - Shapes

    07-26-2012 11:39 PM in reply to: Kent1Cooper

    Sorry If I'm not understanding your reply, but the shape cannot be the first spec. That was one of the first thing i tried. The Space can't be the initial spec either.

    Please use plain text.
    *Expert Elite*
    Kent1Cooper
    Posts: 4,159
    Registered: ‎09-13-2004

    Re: Custom Linetype - Shapes

    07-27-2012 04:58 AM in reply to: dmleves49

    dmleves49 wrote:

    Sorry If I'm not understanding your reply, but the shape cannot be the first spec. That was one of the first thing i tried. The Space can't be the initial spec either.


    No, but it can be the second one rather than the third -- my suggestion was to put it before the pen-up designator, not before the initial pen-down designator:

     

    A,0.0001,[TRACK,Track.shx],-1.1622

    Kent Cooper
    Please use plain text.
    Distinguished Contributor
    Posts: 154
    Registered: ‎07-08-2007

    Re: Custom Linetype - Shapes

    07-27-2012 05:29 AM in reply to: dmleves49

    What a cool linetype.

     

    However, I don't use linetypes that require SHX files. its just another thing that has to occompany your drawing when it shared. I have defined my linetypes to use the standard font. That way ALL users recieving my drawings can view them without the need of other files.

     

    Here's my Vinyl Fence ... set your Standard Textstyle to Simplex with a 0.0 height for it to appear correctly.

    *Fenceline_Vinyl,Fenceline Vinyl ____-____-____-____-____-___
    A,0.250,-0.050,["|",STANDARD,S=0.0250,R=0.0,X=-0.050,Y=0.0083350],-0.0010,["_",STANDARD,S=0.10,R=0.0,X=-0.0510,Y=0.04770],0.0010,["|",STANDARD,S=0.0250,R=0.0,X=0.043250,Y=0.0083350],-0.044250,["_",STANDARD,S=0.10,R=0.0,X=-0.095250,Y=0.00952250],-0.0

     

    For MY tracks ... I went in the field, took exact measurements and then created a dynamic block. Only drawback of a dynamic block (at least in version 2008), you can't make one to to work around an arc.

    Please use plain text.
    Contributor
    dmleves49
    Posts: 18
    Registered: ‎04-21-2011

    Re: Custom Linetype - Shapes

    07-27-2012 09:14 AM in reply to: dmleves49

    Yes arcs are definitely a plus.:smileyhappy:

    Please use plain text.
    Contributor
    dmleves49
    Posts: 18
    Registered: ‎04-21-2011

    Re: Custom Linetype - Shapes

    07-27-2012 09:19 AM in reply to: Kent1Cooper

    That gives me a 'bad definition' error. Thanks for the suggestion though.

    Please use plain text.
    Distinguished Contributor
    Posts: 154
    Registered: ‎07-08-2007

    Re: Custom Linetype - Shapes

    07-27-2012 09:27 AM in reply to: dmleves49

    Hmm. It works great for me. You didn't by chance place it on three lines in the LIN file. It must be only two lines.

     

    fence.JPG

    Please use plain text.
    *Expert Elite*
    Kent1Cooper
    Posts: 4,159
    Registered: ‎09-13-2004

    Re: Custom Linetype - Shapes

    07-27-2012 10:40 AM in reply to: dmleves49

    dmleves49 wrote:

    That gives me a 'bad definition' error. Thanks for the suggestion though.


    Well, I don't have any better ideas.  We have some that are defined just that way, and work well.

    Kent Cooper
    Please use plain text.
    Contributor
    dmleves49
    Posts: 18
    Registered: ‎04-21-2011

    Re: Custom Linetype - Shapes

    07-27-2012 10:58 AM in reply to: Kent1Cooper

    I tried it again and of course it worked nicely. Thank you very much it looks much better. Due to the limitations of AutoCAD and the way they included the shape functionality I do have this problem in polylines where there is a vertex. (Line to Arc transition.

     

    junk.png

    Please use plain text.