Author Topic: Create line styles with 3 lines  (Read 362 times)

0 Members and 1 Guest are viewing this topic.

Lupo76

  • Bull Frog
  • Posts: 310
Create line styles with 3 lines
« on: September 30, 2019, 11:02:43 AM »
Hello to all,
I need to create line styles consisting of 3 parallel lines in a *.lin file.
Is it possible to do this technically? Such as?

Unfortunately I cannot use the MLINE entities.

I hope for your help.
Thanks in advance.

57gmc

  • Newt
  • Posts: 88
Re: Create line styles with 3 lines
« Reply #1 on: September 30, 2019, 12:19:41 PM »
Sorry, but no. You can only create a single line. You can use lisp to add multiple individual, parallel lines though. I still have the old Express Tools DLINE.LSP for creating double lines. Maybe you could modify it to create 3 lines.
« Last Edit: September 30, 2019, 12:29:27 PM by 57gmc »

ronjonp

  • Needs a day job
  • Posts: 7027
Re: Create line styles with 3 lines
« Reply #2 on: September 30, 2019, 12:52:12 PM »
Why no mlines? You could draft with mlines then explode :)

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC

Master_Shake

  • Swamp Rat
  • Posts: 1447
Re: Create line styles with 3 lines
« Reply #3 on: September 30, 2019, 02:31:48 PM »
Your other option is to create a singe line, and perform a double offset via lisp.

roy_043

  • Water Moccasin
  • Posts: 1720
  • BricsCAD 18
Re: Create line styles with 3 lines
« Reply #4 on: September 30, 2019, 03:44:34 PM »
You can do something with the TRACK1 shape. But there will be issues with endpoints, curves, and polylines.
Code: [Select]
*TRIPPLE,Tripple
A,1,[TRACK1,ltypeshp.shx,s=0.5,r=90,y=0.5],0,[TRACK1,ltypeshp.shx,s=0.5,r=90,y=-0.5]
« Last Edit: September 30, 2019, 04:15:27 PM by roy_043 »

Lupo76

  • Bull Frog
  • Posts: 310
Re: Create line styles with 3 lines
« Reply #5 on: October 01, 2019, 09:27:24 AM »
Thank you all for the answers and sorry for my delay.

Unfortunately, I think the only way to get what I need is to develop a lisp from scratch with the reactors to allow the 3 lines to be updated, changing only the central one.
I cannot use the MLINE because they cannot contain arcs, moreover their management lisp would certainly be more complicated than the polylines.

I had already tried the solution of @ roy_043 but unfortunately the problem in the final points is not acceptable in my context.
I just tried the DLINE.LSP and it could be a starting point for my work.

Thanks again for your support.


Lee Mac

  • Seagull
  • Posts: 12267
  • London, England
Re: Create line styles with 3 lines
« Reply #6 on: October 01, 2019, 11:29:15 AM »
To offer an alternative: you could construct standard LWPolylines (using arcs as necessary) representing the centrelines, and then use my Double Offset program to convert one into three. This presents a solution using existing tools, but the operation of performing a double offset could be streamlined and also implemented using a Reactor if required.

Lupo76

  • Bull Frog
  • Posts: 310
Re: Create line styles with 3 lines
« Reply #7 on: October 02, 2019, 02:21:27 AM »
To offer an alternative: you could construct standard LWPolylines (using arcs as necessary) representing the centrelines, and then use my Double Offset program to convert one into three. This presents a solution using existing tools, but the operation of performing a double offset could be streamlined and also implemented using a Reactor if required.

Yes exactly!
I'm going to do just what you suggested by adding a reactor so that when the user changes the axis the 2 parallel polylines are automatically recreated.

Thanks

Pepe

  • Newt
  • Posts: 77
Re: Create line styles with 3 lines
« Reply #8 on: October 02, 2019, 12:46:09 PM »
Hi...

If you want to explore some other ways, here's a funny one in C#...

https://www.keanw.com/2009/08/a-simple-overrule-to-change-the-way-autocad-lines-are-displayed-using-net.html

It isn't very difficult to change the code to show parallel lines, but you'll need to keep the DLL loaded all the time and call the Command for each drawing where you want this happen.

BIGAL

  • Bull Frog
  • Posts: 317
  • 30 + years of using Autocad
Re: Create line styles with 3 lines
« Reply #9 on: October 02, 2019, 11:00:46 PM »
Lee-macs with a reactor sounds good, I did a as many as needed offsets, it just use csv input -3,3,-5,5 would draw 4 lines 3,4,5 draws 3 at the offsets indicated the -ve implies go left not right.
A man who never made a mistake never made anything