Custom Linetype

Custom Linetype

Yonas89
Collaborator Collaborator
2,205 Views
12 Replies
Message 1 of 13

Custom Linetype

Yonas89
Collaborator
Collaborator

Hello, 

 

I know it should be simple, but I am struggling to finalize it and  need your help. I need my shape (arrow) appear every 25 meters on dashed line.

 

This is a copy from my .lin file: 

What am I missing here? 

 


*StormWater path,---->----->---->----->---->----->--
A,0.5,-0.25,[RoDykLe,RoDykLe.shx,R=-90,s=1,],25

0 Likes
Accepted solutions (1)
2,206 Views
12 Replies
Replies (12)
Message 2 of 13

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> What am I missing here? 

What error message do you get or what is your result and how is it different to your expectation?

 

It could be the SHX file is missing or not found or it does not contain symbol "RoDykLe"

It could be the distance is incorrect as we don't know what 25m is in AutoCAD units in your drawing, what scales you are speaking about and how your variable PSLTSCALE is set to.

 

I guess we need more info 😉

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 13

Yonas89
Collaborator
Collaborator

Hey Alfred tahnks for quick reply. 

 

I get no error, its just a bad definition om this line, but I don't know how to correct it. 

I get this result, looks ok, but the line is not dashed.

 

 Linetype1.PNG

 

when i use this definition: *StormWater path,---->----->---->----->---->----->--
A,0.5,-0.25,[RoDykLe,RoDykLe.shx,R=-90,s=1,x=50]I get this result:

Linetype2.PNG

 line is ok, but then the shape is complete mess.

 

0 Likes
Message 4 of 13

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

>> I get this result, looks ok, but the line is not dashed.

If you need the line dashed, you have to built in negative values in your linetype, something like

 

A,0.25,-0.5,0.5,-0.25,[RoDykLe,RoDykLe.shx,R=-90,s=1,x=50],0.25,-0.5,0.25,-0.5

Does that fit better to your needs?

The problem here could be that you want to combine small dash-distances and large distances for the arrow. I guess it's not possible to have a dash-distance of 0.5 (which would then need 100 repeatings before 1 time the arrow symbol should be drawn) as the length of linetype-items is limited.

 

The alternative (not really great but sometimes ok) could be to use the multiline functionality as you can create mutiple linetypes within one object, like one line with linetype dashed and a second linetype with just the arrows with a distance of 50m. Look to MLSTYLE (>>>details<<<) if that can help your process.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 5 of 13

Yonas89
Collaborator
Collaborator

Yes, yours works correct but i need larger spacing between shapes. 

 

LINETYPE3.PNG

 

I think I will use your advice and combine 2 linetypes into one. I will probably create dynamic block.  

 

0 Likes
Message 6 of 13

Kent1Cooper
Consultant
Consultant

@Yonas89 wrote:

.... 

when i use this definition: *StormWater path,---->----->---->----->---->----->--
A,0.5,-0.25,[RoDykLe,RoDykLe.shx,R=-90,s=1,x=50]I get this result:

....

 line is ok, but then the shape is complete mess.


That x=50 is problematic -- it puts the shape 50 units [as affected by linetype scale settings] farther along the "path" object, in the direction it's currently headed, from the current position within the dash-gap sequence, which is why the arrowheads start so far to the right of the beginning of the line.  On an Arc, or a Polyline that bends, that will give you some truly wacky results, with many arrowheads entirely off the path.

 

Can you make your dashes and gaps larger than 1/2-unit pen-down and 1/4-unit pen up?  That's a tiny proportion of the 25-unit arrowhead spacing.  The "shorthand" representation on the style name line suggests [irregularly] only 4 or 5 dashes between arrowheads, which if you want the arrowheads 25 units apart, would suggest something like [untested]:

 

*StormWater path,---->----->---->----->---->----->--
A,4,-2,4,-2,4,-2,[RoDykLe,RoDykLe.shx,R=-90,s=1],-1,4,-2

 

Play around with the pen-down to pen-up ratio, whether the arrowhead is in the middle of a cycle or at the end, etc.

Kent Cooper, AIA
Message 7 of 13

Yonas89
Collaborator
Collaborator

Thanks a lot! Thanks for very clear explanation.

However I have already selected the solution thus I can only give you kudo. 

 

Also, can you explain what does the last 3 numbers (-1,4,-2) mean? sometimes it's just one, sometimes no numbers at all.

0 Likes
Message 8 of 13

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> can you explain what does the last 3 numbers (-1,4,-2) mean?

Values in a linetype are distances, whereas positive values are the part being drawn (pen down) and negative values are distances which are left as spaces.

So 5,-2,5 means

Draw a line with 5 long, then a space (not drawn) with a distance of 2 and then again a line with 5 length.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 9 of 13

Yonas89
Collaborator
Collaborator

Maybe I didn't point it clear enough. I am asking about these values at the end:

 


*StormWater path,---->----->---->----->---->----->--
A,4,-2,4,-2,4,-2,[RoDykLe,RoDykLe.shx,R=-90,s=1],-1,4,-2

0 Likes
Message 10 of 13

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

-1 ... distance from the symbol before = 1 and as it's negative it's just a space distance

4 ...  distance of 4 units to draw a line

-2 ... distance as space as it's negative

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 11 of 13

Kent1Cooper
Consultant
Consultant

@Yonas89 wrote:

Thanks a lot! Thanks for very clear explanation.

However I have already selected the solution thus I can only give you kudo. 

 

Also, can you explain what does the last 3 numbers (-1,4,-2) mean? sometimes it's just one, sometimes no numbers at all.


[You can mark more than one Post as an accepted Solution.]

 

As Alfred explained, they are pen-up [gap -- negative] segments and pen-down [line -- positive] segments.  I put some after the Shape insertion so that the arrowhead wouldn't be at the end of the linetype definition cycle, but out inside of it, so that all linetypes using it will have at least some lines/gaps at both ends.  The arrowheads could be more exactly in the middle of the cycle, with two sets of 4's and -2's before and two after the Shape part, if you like the result better.  That's what I meant by "Play around with ... whether the arrowhead is in the middle of a cycle or at the end...."

 

The reason I used -1 for the gap immediately after the arrowhead, rather than -2 as with the other gaps, is that it makes the entire cycle add up to 25 units, so the arrowheads will be that far apart as requested in Post 1.  But you could achieve the same total with any number of combinations of line and gap sizes [including decimals], quantity of lines and gaps [within the limits of linetype definition rules], etc.

Kent Cooper, AIA
Message 12 of 13

rejoiceCP7UJ
Observer
Observer

Hi,

 

I am trying to create the same linetype and i copied this *StormWater path,---->----->---->----->---->----->--
A,0.5,-0.25,[RoDykLe,RoDykLe.shx,R=-90,s=1,],25

but i am getting the error that says Bad definition path on line 2. May you please assist on what i must do? 

0 Likes
Message 13 of 13

Kent1Cooper
Consultant
Consultant

You must have a compiled Shape file called RoDykLe.shx that contains a defined Shape called RoDykLe.  Read about custom linetype definitions containing Shapes in Help.  You may find it easier to include a Text character > instead of a Shape, but you'll need to fine-tune a y= element depending on the font used in the Style called for.

Kent Cooper, AIA
0 Likes