Tuesday, August 31, 2010

Instructions....YAWN.....how exciting...

I'm glad I did not just stick the handrial routine for free download. It seems a few instructions are needed. I like to think I'm OK at instructions, but there is a 20% of me that says "Room for improvement!"

I have sent the routine to a man, where he lives I don't know, but he has had an uphill battle to get the thing to work. Part of the problem is the method Autodesk used when it first designed lisp routines with dialog boxes. They made it so the main program was in one file, say HRAIL.LSP, and the dialog box was another file, say HRAIL.DCL. The usual problem is that Autocad cannot find where the dcl file is located. They probably had good reasons for their decision, but it has made it tricky for all from then on.

Here is the offending code from the lisp file:

(setq dcl_id (load_dialog "C:\Program Files\AutoCAD 2002\Lisp file\Holes/HRAIL.dcl"))
(if (not (new_dialog "hrail" dcl_id))

Autocad does not like it’s slashes “\” as in the old msdos days. You have to do it their funny way, ie “/”

So the corrected bit will be:

(setq dcl_id (load_dialog "C:/Program Files/AutoCAD 2002/Lisp file/Holes/HRAIL.dcl"))
(if (not (new_dialog "hrail" dcl_id))

I'm hoping this fixes the problem.

Sunday, August 29, 2010

Them there pesky round viewports

A little known snafu with circular viewports is that it is hard to access their properties.

For instance you might want it to plot with conceptual shading.

It can be done as follows:

Right click on the viewport and choose properties. You will see 2 items (one is the circle) are selected because the little drop down at the top says "All(2)" , next, click the little triangle to show the drop down. Pick viewport.

Now you can see the properties, so choose conceptual for the plotting of the viewport.

Saturday, August 28, 2010

Other CAD programs

The above is a screen shot of DoubleCAD-XT.

Way back in 1986, I took a job that promised that CAD was on their radar and had every intention of introducing it. By 1988, they had bought a "CAD" system. It's specs and prices seem laughable today, but in those days it was a fairly average setup.

The computer was a 80386 with about 1 meg of ram, a 19" monitor running about 320 x 200 pixels if I remember rightly. (This was 22 years ago!). The program was an English one called "Supervisions". It proved an easy one to learn, and had a very clever 2 word command system.

For instance you had to pick "Add" then "Line". You could do all sorts of tricks: for instance "select all circles 200mm in diameter" was a piece of cake.

I remember that the whole lot cost about $45,000. This was for computer, software, an A1 pen plotter, and an A4 laser printer. The laser printer was super duper new technology then and was about $5000 worth. I can buy one today for $130.....

At some stage, I had a holiday. When the big boss found out I was the only person in New Zealand that could get a print out of this setup, he arranged for Autocad to be bought.

In true NZ management style, my immediate boss said:"We've got Autocad...training....your problem."

Fortunately for me, I had dabbled previously on an old AT that had no mouse, finding out how Autocad worked. I was not impressed with Autocad. It felt like a giant step backwards. Anyway, I went in, and over a weekend got to a stage where I could sort of draw.

Learning Autocad was a fairly steep hill for the next few months, and I gradually became comfortable with it's funny ways. That is, until I ended up in a consulting engineering place where the engineer said:"Paperspace...I want it done with paperspace!" Very stressful, especially as the permanent staff were not that helpful!

We have yet another new engineer that started recently. He obviously likes drawing because he is one of those ones that seem to like getting out graph paper and bits of plastic with holes in and doing a bit of old fashioned sketching. I've noticed that engineers that do this are usually quite good at their job. At which point I suggested he might like to use a CAD program seeing as he has a computer. What to use and how much might it cost though?

I had heard of Autodesk Freestyle, which is about $US49, so I did downloaded the trial copy.
It seems very much slanted to drawing things architectural, and did not feel very Autocaddish.

Cruising google, I found another one called DoubleCAD-XT. This is very similar to Autodesk's LT. This one is free, and I found it appears to do the 2D job OK, although I did not try to do a proper drawing from start to finish. If you are used to Autocad, this one might be a little irritating, as some commands are similar and others not. His battle now will be to convince the IT department that this is a good idea......

Saturday, August 14, 2010

Photofly and Accessing Blocks

I have given photofly a bit of a try, and a series of pics of a boilerhouse produced something, but I'm not all that pleased with my results. I have to put my hand up here to say it is most likely the way I took the photos.

I questioned some drafting friends and they said accessing blocks was not a problem for them. Apparently I'm an old fuddy duddy because I use the scroll bar in Windows Explorer. The thing to do is to get onto the directory, then hit say "f" for "fixings" to get to the fixings directory.

The result of this must be: "Can you teach an old dog new tricks?"


Monday, August 9, 2010


I'm not having a good run lately. Things seem to be going wrong on a daily basis at the moment after a dream run of 2 years with no problems.

The latest drama is a lisp routine, which while seeming to do the job, was not really.

The routine in question is a round flange drawing one. The problem was that while I keyed in a pitch circle diameter of 295mm, it took it upon itself to draw one at 297.82mm or so....Nasty, because the flange looked ok.

The lesson learned? Make sure any routine that draws anything sets the osmode (ie the running snap value) to ZERO. ie to achieve this , use the following code:

(setvar "osmode" oldsnapmode);this is so that you can reset at the end
(setvar "osmode" 0)

Here is the routine, if you like such things, cut and paste into notepad,
call it flan3d.lsp and load it by dragging it from explorer into your autocad drawing.

To run, type flan3d at the prompt.

;Program written by Bill Le Couteur
;Auckland NZ
;Rev 0 date 16/6/00
;This program draws a flange in 3d

(defun c:flan3d()
(setvar "CMDECHO" 0)
(setq oldsnapmode (getvar "osmode"))
(setvar "osmode" 0)
(setq flangeod(getreal "\nEnter the outside diameter: "))
(setq flthick(getreal "\nEnter the Thickness: "))
(setq flangeid(getreal "\nEnter the Internal Diameter : "))
(setq boltholedia(getreal "\nEnter the Bolt Hole Diameter: "))
(setq boltpcd(getreal "\nEnter the PCD: "))
(setq no_holes (getint "\Enter the number of holes: "))
(setq boltpcr (/ boltpcd 2))
(setq the_point (getpoint "\nPick the point to draw it: "))
(command "cylinder" the_point "d" flangeod flthick)
(command "cylinder" the_point "d" flangeid flthick)
(command "cylinder" the_point "d" boltholedia flthick)
(command "move" "l" "" "0,0" (list boltpcr 0))
(command "array" "l" "" "p" the_point no_holes "" "" )
(setvar "osmode" oldsnapmode)
(setvar "CMDECHO" 1)