Jump to content

Is there any lisp to connect to selected block or point by a line offset from a selected layer


Elektrik

Recommended Posts

For example, if I place an electrical panel board on a wall, and socket outlet on another one, I would like a lisp to automatically connect the two by a line offset from another one, like running a cable along a wall? I would be great to automatically connect several appliances to a panel. Revit can do that by automatically assigning a socket or a lighting button to an electrical panel, but you cannot choose a route for cables. It just creates some arcs running through several walls to connect them. Thanks in advance.

Connection.jpg

Link to comment
Share on other sites

I haven't seen a ready made LISP for this but i think what you are asking is possible.

 

Is your wall a line, polyline, or in a block by the way? That makes things easier or not (polyline is easiest)

 

I guess you' want to select the wall line, then the 2 end points, the socket outlet and the panel, then the LISP would offset the wall (easy, '(command "offset" Distance SelectedWall)', work out the centre of the equipment (there are LISPs out there, centres of circles are easy, and for rectangles if they are polylines can get the coordinates and work out the geometric centre), and draw a line from that to the nearest point on the polyline (get nearest point or something,

 

So it is all possible if there isn't anything

 

 

 

Have you had a go at putting something together yet? try it step by step, see if you can offset the wall line first, then see if you can get something to get the centres of the equipment.. and go frpm there

  • Like 1
Link to comment
Share on other sites

I wrote a water main program and does almost what you want it asks for a offset then you pick lines and it follows you can jump gaps etc You would need to add the start end join to a block bit but that is easy.

 

Need a dwg to look at, are the yellow lines or plines or combo of both ?

 

There is a couple of methods using bpoly that would speed up the offset part but again a dwg would help.

Edited by BIGAL
  • Like 1
Link to comment
Share on other sites

You could create Customized  MultiLine Styles to do this, including colors and spacings.

Placed on a custom Pallete.

It looks like marko_ribar has pulled up some of his beautiful lisps to help

you get back on the tracks.  :thumbsup:

  • Like 1
Link to comment
Share on other sites

8 hours ago, BIGAL said:

I wrote a water main program and does almost what you want it asks for a offset then you pick lines and it follows you can jump gaps etc You would need to add the start end join to a block bit but that is easy.

 

Need a dwg to look at, are the yellow lines or plines or combo of both ?

 

There is a couple of methods using bpoly that would speed up the offset part but again a dwg would help.

 

I would prefer yellow lines to be polylines. I want to select a few block and assign them to one line, then select others and assign them to another line, until I do not need another line. Thanks in advance for any help.

Drawing.dwg

Link to comment
Share on other sites

Ok to me you have missed a step and gone onto step2, the 1st step looking at your dwg is place the blocks so pick end, pick along, enter distance and offset, block is placed. repeat as required so get 4 blocks as in dwg. Then do offset yellow line pick end block, pick next, exit and repeat for 2nd or more offset lines. 

 

The only issue I see is the end electrical panel may have to do that manually trimming lines.

 

So yes you want step1 then step 2 ?

 

 

  • Like 1
Link to comment
Share on other sites

6 hours ago, BIGAL said:

Ok to me you have missed a step and gone onto step2, the 1st step looking at your dwg is place the blocks so pick end, pick along, enter distance and offset, block is placed. repeat as required so get 4 blocks as in dwg. Then do offset yellow line pick end block, pick next, exit and repeat for 2nd or more offset lines. 

 

The only issue I see is the end electrical panel may have to do that manually trimming lines.

 

So yes you want step1 then step 2 ?

 

 

Lisp might or might not place blocks, as long as it connects blocks with a line offset from another line or polyline, etc. Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...