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

mline but three lines lisp

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
mpa-la
1905 Views, 10 Replies

mline but three lines lisp

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

10 REPLIES 10
Message 2 of 11
CodeDing
in reply to: mpa-la

@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


Need AutoLisp help? Try my custom GPT 'AutoLISP Ace':
https://chat.openai.com/g/g-Zt0xFNpOH-autolisp-ace
Message 3 of 11
hak_vz
in reply to: mpa-la

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
in reply to: mpa-la

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)
Message 5 of 11
Shneuph
in reply to: Shneuph

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)
Message 6 of 11
Sea-Haven
in reply to: mpa-la
Message 7 of 11
Kent1Cooper
in reply to: Sea-Haven


@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
Message 8 of 11
Kent1Cooper
in reply to: Kent1Cooper


@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
Message 9 of 11
mpa-la
in reply to: Kent1Cooper

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
in reply to: mpa-la

@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


Need AutoLisp help? Try my custom GPT 'AutoLISP Ace':
https://chat.openai.com/g/g-Zt0xFNpOH-autolisp-ace
Message 11 of 11
Sea-Haven
in reply to: mpa-la

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report