Elektrik Posted August 20, 2022 Posted August 20, 2022 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. Quote
Steven P Posted August 20, 2022 Posted August 20, 2022 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 1 Quote
marko_ribar Posted August 20, 2022 Posted August 20, 2022 Search this forum, search for me and you'll find something very similar in past... Quote
marko_ribar Posted August 20, 2022 Posted August 20, 2022 I could not find original topic, but here are 2 routines from my library that were the issue at that time... Sorry for delay, it took me a while to browse my posts... pt2ptbycurve.lsp pt2ptbylw.lsp 1 Quote
BIGAL Posted August 23, 2022 Posted August 23, 2022 (edited) 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 August 23, 2022 by BIGAL 1 Quote
Dadgad Posted August 23, 2022 Posted August 23, 2022 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. 1 Quote
Elektrik Posted August 23, 2022 Author Posted August 23, 2022 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 Quote
BIGAL Posted August 24, 2022 Posted August 24, 2022 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 ? 1 Quote
Elektrik Posted August 24, 2022 Author Posted August 24, 2022 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. Quote
Recommended Posts
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.