Monday, May 18, 2009

Electrical Drawings...grump grump....

How low do I go? Electrical drawings is how low. Still, it's all part of the work and it is only occasional. Just to add to the fun I decided we needed a super duper way to extract from an Excel spreadsheet the data needed to fill out a PLC card.
This was done by saving the file as a csv file, in other words a text file, but one where the columns have been replaced by commas.
Once this has been done, PLC.lsp is flung into action in the right drawing (ie a PLC card drawing with blank spaces). This inserts all the relevant blocks with all the right info at the correct positions.
It works, but one of the problems is that the description might be on 3 lines while the spreadsheet only supplies one cell. So an advanced version of this would need to parse the description string, analyse how many words it had and split it up accordingly.
Maybe next weekend.....

Saturday, April 25, 2009

Everyone Draws Rectangular Flanges, don't they?



The other day I got sick of drawing yet another rectangular flange.
I thought: get smart-someone else must have done a lisp for this.
But no. At least as far as I looked- which was not all that far.
There was one found but it did not perform the way I wanted, so
I decided to write my own. Needless to say it appears to have
taken a day and half out of my life.


It occurs to me now, that my time would probably have been
spent better watching TV or taking Rose for a walk.


Anyway, it was a vague sort of challenge, and it is finished now.
One of it's features is that it does produce 3D solids when it
has finished. It also flies in the face of "traditional" methods
of spacing of bolts. Normally in the old days a draftee would
work out the bolt centres (theoretical) then choose the nearest
value to make the centres. For instance, he might have calculated
137.5mm as the hole centres. To make the drawing not have the
dreaded 0.5 or the "hard to read" 137, he would have said
nearest is 140mm. Then the dimension between the end hole
and the next one in might have ended up at say 122mm.


I have suddenly had an epiphany: all the flanges I have been
drawing lately have been laser cut. So who cares if the hole
centres are 137.5mm? Not me. Especially when it
made this routine a lot easier to write. No doubt the
traditionalists out there will be pouncing on me for being
so outrageous!


Here is the dialog box - where you fill in all the variables.




It does make the layers "Front Flange", "Back Flange"
and"Gasket", otherwise it does not appear to do anything
drastic to your drawing. I have made it so that it can be used
in an existing drawing-ie you don't have to run it in a new drawing.
I have had the odd situation (which I could not make it repeat)
where it seemed to lose the plot and put the holes in the
wrong place-almost as it the snapmode had gone nuts.
When I checked osmode, I got something like 16477,which is
a strange one, considering the whole thing just uses
standard commands and hopefully does not reuse Autocad's
reserved commands like angle and so on.
An extension I did consider was to insert bolts/nuts and washers.


Monday, April 20, 2009

Filleting Polylines

Exciting stuff, huh! oh well....
In my ponderous progress towards writing a lisp that does steel handrails, I came across
a little corner of Autocad I had not realised was available: If you go Fillet, you are given the option to fillet a polyline. You just pick the polyline and it fillets every corner in one go. How often the average user would need this I'm not sure, but it sure does come in handy for my handrail routine!

Thursday, April 2, 2009

Not really Autocad...but where to put it?

One of my hobbies is to play around with a bit of programming.

I have looked at Basic, C, Autolisp, VB6, VBA and now I have downloaded
the freebie from Microsoft, VB 2008 Express Edition.

I can say that this represents an improvement of VB6, at least as far as the
small amount of things I have asked of it so far. I downloaded it to make a
small program, which, hopefully, will be needed where I work....

This post is essentially a repeat of my site at http://bilroCAD.com/Risk Analysis.html


This is the new program as it runs: it consists of two dialog boxes,and amounts to pressing buttons and selecting from lists. Once the program is run, it creates a text file-see listing below for that one.





This is the contents of a typical text file the program produces:

Task Analysis

Date Created:2009-04-02

The Task: Remove Beams

The Plant:Porana Rd

Permits: glass permit

Personal Protection: safety goggles

Equipment: gas sets

Step No: 1

The Action: Remove old conveyor
Hazard: gas

Type of Control: Eliminate

Means of Control: ,chemical isolations,standby personnel

You can see that this is site specific and could not be used on other plants. Why am I posting this here? To see if anyone is interested in such a program.You can email me at bill@bilrocad.com
A more general program would be identical, except the Plant and the Location boxes would extract their items from 2 separate text files, created by the user. I would imagine a fair price for the program might be US$20.
Another option might be a customised one that can only be used by your firm-the logo shown (mine) can easily be replaced by one that your firm uses.

Limitations are:

1. You have to make a directory c:\Task Analysis

2. The output is to a text file, which if you wanted to alter fonts and so on, then you would need to open the file in MS Word instead of Notepad.

3. At the moment the file output name is the same as the date. This means that if you do more than one on the same day, it just appends it to the file created before on that day.

4. It does not allow for multipages-for instance you might have Step No: 7 at the bottom of a page, then The Action on the next page.

5. It does not have "the smarts": for instance, if you chose say "welding"the program should suggest "welding helmet" and so on. It does not do this. Some might say the idea of this program is not the spitting out of a form, more the engagement of the person about to perform the task thinking about what he is doing.

All of the above limitations might be got around, but no gaurantees!

Wednesday, April 1, 2009

Everybody draws Handrails...don't they?

Handrails....A necessary evil, as the fun of drawing them soon diminishes.
Unless you are the type of draftsman that finds them relaxing,because it is the ultimate in blame free drafting: How can you possibly get them wrong?
Over the years I have come across many different styles of handrails. Once I created a very badly written lisp to automatethe process. It only drew the railings as a 50 x 50 square, to save on computing horsepower- it was in 3D.

With me getting Autocad Architecture, I was in hog heaven, because it had a very smart
system for drawing handrailing. You just decided on a style, and picked a few points and there it was.
Unfortunately, I am back in the mechanical world of vanilla Autocad,and there don't appear to be any such items on it's horizon any time soon. Not that I draw handrails very often, so when I do it is not a big deal.

My original plan was to get all the ducks in a row on this one, and present about 4 different types of handrails as "ways" of doing them.

So far I have only got this drawing:


Please excuse the image quality-I originally posted this as a jpg, but when saving it back I noticed that the text was unreadable. Hence the png file above, which might work better.

If not, I'll post it on my site: http://bilrocad.com/ ....eventually!
It is for a food factory, so it is made from stainless steel. The good things about it are the lack of welding required and the ease of construction.The rails are just straight cut, and there is the theory that any sweeping to be done would just brushout through the 10mm gap in the kickplate.

The plan is you start sweeping at the top level and work your way down.
The bad thing is the little vee on the top of the stanchion, as this would snag sleeves and hands. It could be improved a lot by making the top rail continuous and not having the vee. This would mean that semicircular cuts would have to be made in the top of the stanchion, but with proper tooling, this might be a good thing.

I have a suspicion that this design has not been "engineered", so should not be trusted to conform to any standards.
This lack of "engineering" just highlights to me how bad a world standard is needed: We, as draftsmen or engineers, should never be choosing our own designs for such a mundane thing as a handrail. We could have a choice of very well engineered and thought out designs to choose from. For an engineer to be designing a handrail represents a waste of resources.
I hope to post further on this topic, with more designs and eventually putting on my website a series of drawings that could be used as a "semi-standard". I'm not an engineer, so these " semi-standards" would only be that.



Unless someone knows of a site that does?

Wednesday, March 18, 2009

Specs for a CAD computer

I'm just trying to sort out a spec for a CAD computer.

At the moment I have an Intel Duo, about 18 months old, running Vista 32 bit, with 2 Gb of Ram and a Quadro FX1500 graphics card. I have a 20" main monitor and a 17" second monitor,both Philips. This setup seems to go well, I have the occassional crash, but who doesn't?

For normal computer users, a certain standard of computer is fine-all you need is about $NZ850, plus say $NZ200 for a monitor and you are done.

Just to add to the fun, the NZ dollar has depreciated against the US and Euro (it is about
NZ$1=US$0.53 at the moment.

I have priced up HP workstations-they seem to have quite a large range, it really comes down to how much money you are happy to pay in these recessionary times!

What I'd really like would be an Intel Xeon Quad core with a 24" main monitor/20"second monitor, high end graphics card, 64bit 6GB ram and so on. Hmm...just dreaming really....

Sunday, March 8, 2009

Drawing a house automatically

Drawing of a house using 3D solids in Autocad.


For draftspersons receiving a hand-drawn item from an architect,it could be a quick way of getting this into Autocad.

Users should be aware that there are "better" ways of drawing a house.These ways are Autocad Architecture, or Autodesk Revit.

Unfortunately these cost money, and you may have only a copy of plain vanilla Autocad. If you have better than Autocad 2007, you will be able to make use of the section command to produce plan views of your 3D model.

The idea is that all houses can be represented by data, and that we can describe a house by how long each wall is, how many windows in that wall, and what sort.

It is in a trial state at the moment. The program works,but the quantity and quality of the windows available are low.You can check out what is available in the zip file, the contents of which should be placed in a directory called c:\bilro\house.
If enough people try it out and want it to come up to the next level,then I will produce some windows (for a small fee of course!).

The procedure is as follows:
1. Run the program, House.exe. It was made in Visual Basic 6.0, so does not need to be installed. All this does is ask a series of questions, then creates a text file based on the answers. It puts this text file in c:\bilro\House. So if this directory does not exist, you would need to create it. You have to start at the bottom left hand corner of the house and go anti-clockwise about it.




2. Open up the file using Notepad. It should look like this:
WALL
0
5000
90
2455
OUTERCORNER
1
W2 600 x 1200
600
1200
500
2000
WALL
0
6000
90
2455
OUTERCORNER
1
W2 600 x 1200
600
1200
1000
2000
ENDWALLS
Now the same thing but comments just for this instruction only-
WALL-so we know it is a wall
0-this is the orientation-ie 0= horizontal, 90=vertical etc
5000 -this is the length of the wall
90 -this is the thickness
2455 -this is the height
OUTERCORNER-this is how the end of the wall is
1 -number of openings
W2 600 x 1200-name of the block in the first opening
600 -window height
1200 -window width
500 -length from the start end
2000 -head height of the window
WALL-this is the next wall
and so on.....
6000 90 2455 OUTERCORNER 1 W2 600 x 1200 600 1200 1000 2000
ENDWALLS-just to let the program know its at the end!

3. Add c:\bilro\house to your autocad path (go Tools/options/files)

4. Rename the file to houseinfo.txt. Then load Ho.lsp into Autocad, type HO and then enter.
These instructions are included in the download zip file as a text file called How to Manual.txt
Please only use the available window blocks, otherwise autocad goes looking for things that are not there. If you open Drawing16, you will see an example of what is produced.