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

Custom Linetype - Shapes

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
dmleves49
744 Views, 10 Replies

Custom Linetype - Shapes

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

10 REPLIES 10
Message 2 of 11
Kent1Cooper
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, AIA
Message 3 of 11
dmleves49
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.

Message 4 of 11
Kent1Cooper
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, AIA
Message 5 of 11
dvertz
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.

Civil 3D 2022,
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2


Message 6 of 11
dmleves49
in reply to: dmleves49

Yes arcs are definitely a plus.Smiley Happy

Message 7 of 11
dmleves49
in reply to: Kent1Cooper

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

Message 8 of 11
dvertz
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

Civil 3D 2022,
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2


Message 9 of 11
Kent1Cooper
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, AIA
Message 10 of 11
dmleves49
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

Message 11 of 11
Kent1Cooper
in reply to: dmleves49


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

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