PDA

View Full Version : I Need Help


fire_fighter_31
Dec 26, 2005, 08:46 PM
I am wanting to design a very simple program to increase my output at work. I do a lot of blueprint measurements, and I am wanting to be able to put this info into a program, which will allow it to calculate the Square Footage of the exterior walls. I have done it in Excel, however I would really like to have a stand alone program that I can use in windows to just click, say an "add wall dimension" button, and a text box will come up. Once the measurement is added, it will transfer over to another box and total all the measurements to give a total Sq. Ft.

What program do you suggest I use? Will visual basic allow me to do this? If so, how do I go about using it. I have never used it before, but I bought a copy for the hell of it...

Thanks

CroCivic91
Dec 27, 2005, 03:39 AM
Take a look at the picture I attached. If that looks fine for you, I can send you my Borland C++ Builder Project I just now did for you, and you can try and do the same thing in Visual Basic. Or, I can compile the project and send you an executable version.

Do you want to have a list of saved wall dimensions too, or you just want to enter height and width and for it to calculate the dimension?

If you just want advice, then yes, Visual Basic is more then enough to do that. Open up Visual Basic and look for an "Edit Box". Click it and stick it onto your "Form" (main application's design window). Put two more edit boxes on your screen. Then search for a Button and put it on the screen too. Then look under "Events" for a button, and make an "OnClick" event that says something like this: "third_edit_box.Text = first_edit_box.Text * second_edit_box.Text". That should be about it :)

Also, since I don't like using a mouse when I can use only keyboard, I made an "OnKeyPress" event on the edit boxes. What it does is, it checks to see if the pressed key was an Enter key, and if it was, it sets keyboard input focus on the width edit box (if the enter key was pressed inside the height edit box), or it does something like "Button.Click()", which calculates the area and automatically sets the focus to height edit box (if it was inside width edit box).

ScottGem
Dec 27, 2005, 07:16 AM
I am wanting to design a very simple program to increase my output at work. I do alot of blueprint measurements, and I am wanting to be able to put this info into a program, which will allow it to calculate the Square Footage of the exterior walls. I have done it in Excel, however I would really like to have a stand alone program that I can use in windows to just click, say an "add wall dimension" button, and a text box will come up. Once the measurement is added, it will transfer over to another box and total all the measurements to give a total Sq. Ft.

What program do you suggest i use? Will visual basic allow me to do this? If so, how do I go about using it. I have never used it before, but I bought a copy for the hell of it ...

Thanks

Very nice of CroCivic to throw together a little program for you. However, I have a suggestion from a different angle. What you are talking about is essentially CAD stuff. If you use a CAD program, you can probably import drawing files from the architect and the CAD program can do all those calcs for you.

fire_fighter_31
Dec 27, 2005, 10:03 AM
Do you have msn? If you do, add me we can talk... [email protected]

That is what I am looking for, however I need some other stuff in it too.

That looks awesome... I really have no idea what I am doing, but that looks along the lines of what I need...

Your awesome!

Thanks :)

fire_fighter_31
Dec 27, 2005, 03:31 PM
that is the idea of what I need, however I need to calculate the Sq. Ft. of many different walls, having them split up into sides and listing them... then I need a separate list for sq ft for windows and doors, to subtract from the sq ft of the walls, to give a total face sq ft. As well, from the total face Sq. Ft. I need it to figure out how many bags of cement, rolls of starter strip, tuck tape and angle iron. I need it to figure out total angle iron, as well the size of the angle iron (3 1/2 x 3 1/2 x 1/4 or 5 x 3 1/2 x 5/16 etc) for each opening and how many feet of each size we need. It was really easy to do this in excel, however I am not sure how easy it would be to program this.

Any help??

Thanks

CroCivic91
Dec 27, 2005, 05:12 PM
Do you have msn? if you do, add me we can talk .... [email protected]
Unfortunately, I don't. I only use ICQ and Yahoo. You have my info in my profile if you want to send me a message/mail there.

What I think you want to do doesn't seem that hard to do. Not for someone who never used Visual Basic, but for someone who knows their way around, it shouldn't be hard.

I'm not quite sure I know EXACTLY what you want to do, so if you care to attach a sample of an excel file you used to work with, I might get a better picture of your needs and help you more.

fire_fighter_31
Dec 27, 2005, 07:28 PM
I have the modified version at work, but basically this is what I need...

Thanks

CroCivic91
Dec 28, 2005, 05:10 AM
All right, so you need to save data for a list of customers.

For each customer, you need to save a list of walls, and a list of "openings" in the walls (in the forms of doors and windows) along with a small box to make a comment whether it's a door or a window. While you enter wall dimensions, you want the program to sum up all the wall areas and subtract all the openings areas. Then, based on total area and some formula, you calculate the bags of cement and other stuff.

I can explain to you how I would do this. I would save all customers (their name and a file name with their data) into one XML file, of the form:

<customers>
<customer>
<name>Customer 1</name>
<file>customer1.xml</file>
</customer>
<customer>
<name>Customer 2</name>
<file>customer2.xml</file>
</customer>
</customers>

So, then you can have one "ListBox" in your program and go through the customers XML file and fill it's data with info from this file.

By clicking on any customer in the box, you can load it's customer's XML file (you get it by reading appropriate <file> field) and fill 2 more lists from it.

Customer's XML file might look like this:

<customer1>
<wall>
<heigth_feet>38</height_feet>
<heigth_inch>2</height_inch>
<width_feet>100</width_feet>
<width_inch>0</width_inch>
</wall>
<wall>
<heigth_feet>38</height_feet>
<heigth_inch>2</height_inch>
<width_feet>150</width_feet>
<width_inch>3</width_inch>
</wall>
<opening>
<type>window</type>
<height...
<width...
</opening>
...
</customer1>

So you go through that file and enter info into 2 other list boxes. And you make a button with "OnClick()" event that goes through the ListBoxes and calculates everything you need based on a formula.

Does this make any sense to you?

fire_fighter_31
Dec 28, 2005, 09:02 AM
It makes somewhat sense I suppose... I am just not sure how to add this to the VB... I am pretty sure you go to the "code" window and put the info in? Is this correct?

fire_fighter_31
Dec 28, 2005, 09:03 AM
I need to have the ability to print this information... and the program should be a standalone program

CroCivic91
Dec 28, 2005, 04:30 PM
Well, you have to go to the "Code window" and enter a lot of commands. If you want to, I can try and make something for you in C++ Builder, but I cannot promise how long it will take me to do it for you.