Electrical Network Design
Hi.
I must design an electrical network. The problem I have is about VB 6.
Suppose we have 2 buttons:
- V (vertical line)
- H (horizontal line)
We have also an initial point A.
When I press the button H the program must draw a horizontal line starting from the initial point A to the point B.
When I select the point B with a click, and I press another time the button H, I shall have another horizontal line from point B to point C.
Now if I select again the point B and I press the button V, I shall have a vertical line starting from point B to point D.
Based on this principle, I can extend my network.
After designing my network, each portion can receve differents parametres, as length, ... I am thinking to do this with a right click on each line (AB, BC, BD, ...).
I am not an expert in VB and that is why I am asking you to give me some ideea of how can I start this project. What can I use instead of Line() to be able to handle this elements with right clicks, changes of lenghts, color,...?
Re: Electrical Network Design
Hi,
you should use line to draw the graphics (I'm not sure what else you could use for that.) As far as storing you parameters for each line, I would consider using a UDT as follows
VB Code:
Private Type Line_Parameter
.length
.color
.whatever
end type
then declare a dynamic array of this UDT and each time you add a new line use a ReDim Preserve to add it to the array. Since adding a line seems to be a manual process, the slowness of the ReDim shouldn't be a concern. There may be a better way: this is just how I would approach it.
HTH
kevin
Re: Electrical Network Design
You know there are some programs already made that help you create electronic
schematics. I think one I used to use was ORCAD. I cant remember, think I'm
getting old ;) It had a library of electronic devices that you could add to the
drawing and connect to with lines, etc. It would also calculate the the
output voltage/amphrage based on the specified input.
HTH
Re: Electrical Network Design
I'm not sure that's what he/she is looking for, but if so there is free PCB layout software here, and is pretty good for being free.
kevin
Re: Electrical Network Design
Looks good, but what are the freeware limitations from the paid version?
Re: Electrical Network Design
as far as I remember you are simply limited to a 3"x4" board
kevin