mline but three lines lisp

mline but three lines lisp

mpa-la
Advocate Advocate
2,861 Views
10 Replies
Message 1 of 11

mline but three lines lisp

mpa-la
Advocate
Advocate

Does anyone know of a lisp routine similar to mline, but allows you to draw 3 parallel lines offset different distances from each other?

0 Likes
Accepted solutions (2)
2,862 Views
10 Replies
Replies (10)
Message 2 of 11

CodeDing
Advisor
Advisor

@mpa-la ,

 

I can't think of one immediately, but I'm sure there is something similar on the forum somewhere.

 

What is wrong with using MLINE though? Can you give us more detail as to why you do not want to use MLINE?

 

Best,

~DD

0 Likes
Message 3 of 11

hak_vz
Advisor
Advisor
Accepted solution

Here is my code written to create set of parallel colored wires that I can modify if this is what you are looking for.

It creates something like this. Type CPL to run, and INIT to define offset. First create a polyline you will offset to a side.

Untitled.png

 

 

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 4 of 11

Shneuph
Collaborator
Collaborator
Accepted solution

Yah, it's called MLINE.  lol

 

Look at MLSTYLE

 

https://help.autodesk.com/view/ACD/2020/ENU/index.html?guid=GUID-F6B59910-4160-4B3F-A91F-C0E9783BA03...

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
0 Likes
Message 5 of 11

Shneuph
Collaborator
Collaborator

https://help.autodesk.com/view/ACD/2020/ENU/index.html?guid=GUID-180430E3-74CB-4836-9FF0-A3D57F925D2...

 

mline.png

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
0 Likes
Message 6 of 11

Sea-Haven
Mentor
Mentor
0 Likes
Message 7 of 11

Kent1Cooper
Consultant
Consultant

@Sea-Haven wrote:

2 3 4 how many ?


[See the Topic title, and the description in Message 1.]

 

I would also make an MLINE, and then if it needs to be separate Lines, EXPLODE it.

Kent Cooper, AIA
0 Likes
Message 8 of 11

Kent1Cooper
Consultant
Consultant

@Kent1Cooper wrote:....

I would also make an MLINE, and then if it needs to be separate Lines, EXPLODE it.


That gives you the chance to have different spacings as requested in Message 1, whereas the code at Message 3 uses equal spacings.  And without separate command definitions, you can draw it along either edge line or by the middle of the overall width.  And you can have different linetypes and/or colors for the 3 if you like.

 

But it has the disadvantage that it can't involve arc  segments.  If you need those, something that has you draw a Polyline and then Offsets it twice would probably be needed.  If that's how you want to go, would you always want to draw the middle  one and have it Offset to both sides by different amounts, or would you want to draw one edge  and have it Offset to the same side twice by different amounts?

Kent Cooper, AIA
0 Likes
Message 9 of 11

mpa-la
Advocate
Advocate

Hey everybody, thanks for the input!  A friend asked me to help him find a lisp that would do what I asked.  I have only ever used mline to do two lines, I didn't even realize it could do more.

Message 10 of 11

CodeDing
Advisor
Advisor

@mpa-la ,

 

Multilines can draw many lines in parallel, and you can even use custom line types to get some cool effects if necessary. I would suggest to you (or your friend) to read into them more and play with creating styles a bit before referring to a Lisp. Here's some more info:

 

About Multilines:

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoC...

 

To Create a Multiline Style:

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoC...

 

To Modify Multilines:

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoC...

 

Best,

~DD

0 Likes
Message 11 of 11

Sea-Haven
Mentor
Mentor

Like Kent you can have a multi offset pline, code is already out there already eg type 1,2,-1,-2 Four offsets are done or more as its csv input method, can be 1 or 8 etc. It is optional to delete the original pline as well.

0 Likes