Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Contributor
dmleves49
Posts: 18
Registered: ‎04-21-2011
Message 1 of 11 (397 Views)
Accepted Solution

Custom Linetype - Shapes

397 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


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


dmleves49 wrote:

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.....


Make sure the PLINEGEN System Variable is set to 1 to enable generation of complex linetypes around/through Polyline vertices:

 

(setvar 'plinegen 1) ... or ... type PLINEGEN and answer 1 at the prompt
 

Or for Polylines already drawn, pick on them, and in the Properties box, in the Micellaneous category, set Linetype generation to Enabled.

*Expert Elite*
Kent1Cooper
Posts: 5,606
Registered: ‎09-13-2004
Message 2 of 11 (392 Views)

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
Contributor
dmleves49
Posts: 18
Registered: ‎04-21-2011
Message 3 of 11 (380 Views)

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.

*Expert Elite*
Kent1Cooper
Posts: 5,606
Registered: ‎09-13-2004
Message 4 of 11 (365 Views)

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
Distinguished Contributor
dvertz
Posts: 164
Registered: ‎07-08-2007
Message 5 of 11 (362 Views)

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.

Autodesk Civil 3D 2014, Network, Carlson Software 2014, Build 121220
Windows 7 Pro, SP1 x64, AMD FirePro V4900 (FireGLV) (1920x1200)
Intel Core i7-3770 @ 3.4GHz, 8 GB RAM, 465GB WDC HD – 399GB free


Contributor
dmleves49
Posts: 18
Registered: ‎04-21-2011
Message 6 of 11 (350 Views)

Re: Custom Linetype - Shapes

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

Yes arcs are definitely a plus.:smileyhappy:

Contributor
dmleves49
Posts: 18
Registered: ‎04-21-2011
Message 7 of 11 (349 Views)

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.

Distinguished Contributor
dvertz
Posts: 164
Registered: ‎07-08-2007
Message 8 of 11 (346 Views)

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

Autodesk Civil 3D 2014, Network, Carlson Software 2014, Build 121220
Windows 7 Pro, SP1 x64, AMD FirePro V4900 (FireGLV) (1920x1200)
Intel Core i7-3770 @ 3.4GHz, 8 GB RAM, 465GB WDC HD – 399GB free


*Expert Elite*
Kent1Cooper
Posts: 5,606
Registered: ‎09-13-2004
Message 9 of 11 (340 Views)

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
Contributor
dmleves49
Posts: 18
Registered: ‎04-21-2011
Message 10 of 11 (338 Views)

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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.