Jump to content

Electrical Wiring Program


brawleyman

Recommended Posts

Hey guys! I have always come here for answers to my Lisping needs, but now I need to request some help with a Lisp I have been working on for a few days.

 

I created this program that allows you to draw electrical circuits with choices of exposed/concealed conduit, homerun/full run, number/type of wires in circuit, etc. I have the input, wiring and block creation down, but now I just need to figure out how to insert and align the symbols for the different wires along anything curved.

 

The closest program I can find to what I need is LeeMac's Object Align routine, however, it only allows you to select objects as a whole and align the whole to the line, not the individual objects aligned to the curve like you see on electrical wiring plans. I love the preview stuff of LeeMac's program, just need a version where the individual objects are aligned separately as shown in the below images.

 

Lee's:

LeeMac's OA.jpg

 

What I need it to look like:

New OA.jpg

 

LeeMac, is there perhaps a way you could incorporate this into your code as an option to align objects individually at their insertion points? Right now, my code prompts for a point to draw all of the symbols used and the number of them in a straight line. I could then use this updated program to select those symbols and align them to whatever curve I needed too

 

The absolute best way would be to adjust my original code so that after you draw your circuit lines, it shows a live dynamic preview of all the symbols used aligned at their basepoints along the line you want to put them on. But maybe that would be for another day... Unless LeeMac, you would like to check out my code and tweak as needed...

 

****EDIT****

I figure I might as well go ahead and post up what I have so far. It is working pretty good, except that the first time I choose how many of each to use, it doesn't space the blocks correctly, but then it will afterward. Perhaps people can see what direction I am taking this and offer ideas or improvements to the code to make it work better?

 

MEP Design.zip

Edited by brawleyman
Link to comment
Share on other sites

Okay, I have adjusted the code so that now it does most of what I am wanting it to do by trying to strip out what I didn't need from LeeMac's code and "frankenstein" it together with my stuff to make it put the symbols on the electrical line.

 

Now, I would really like to make it so that instead of it being frankenstein'd together, I would like to actually integrate all of it together. Also, I would like to be able to place multiples of the symbol set on electrical lines, then right click to enter back into the symbol setup so that I can change the number of lines, then go back and continue placing the updated symbol set on other lines.

 

Take a look and see how this can be improved, meanwhile, I will keep playing around with it and see what I can come up with too. I am not very well versed in Lisp, but I have been able to take bits and pieces of code from different locations and put it together to make things work.

 

HFAMEP.lsp

Link to comment
Share on other sites

I have to wait to download your zip when I get home.. Are you looking for something like this? [ATTACH]34580[/ATTACH]

 

Yeah, something like that, except built-in to my electrical wiring program. Electrical wiring right now is just arcs or plines with straights and arcs, but it could also perhaps be splines or other things too. I just want to try to come up with a very simple yet powerful wiring program.

 

Something where you don't have to select any objects, just when you are ready to put the number of symbols from the wiring input window, it will follow whatever arc/line/whatever you want. Thanks Lt Dan's legs for the video!

Link to comment
Share on other sites

Okay, here is an update that gets me to about the closest I can on my own. I still haven't been able to get the individual symbols to align separately to the arcs, but at least this is a "working" product that is close to what I want it to do.

 

HFAMEP.lsp

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...