Showing posts with label Autocad. Show all posts
Showing posts with label Autocad. Show all posts

Sunday, October 24, 2010

Video Postings

I have been sort of busy doing some videos of my window frame drawing lisp set.

The above is an experiment to see if video embedding works.

The other videos can be found on youtube, just type bilrocad into the search box.

We had a long weekend here in Auckland, and I have been trying to find out how to stop huffing sounds when doing a video. (Maybe I should get a life? ...or paint the fence???)

For probably equally strange reasons I started doing a test of my Autocad skills on Brainbench, but made a bit of a hash of it and got a case of the "can't be bothereds" half way through. If you are tempted to do the test, make sure you have Autocad up and running before you start!

Wednesday, March 31, 2010

Title block pain

Just plodding my way through (pardon the pun) a bunch of Hazardous Area drawings and it was pointed out the the company logo had gone all funny. This is on about 40 drawings.

If you had 2 or 3 drawings you would just reinsert the block, redefining the old one. So you would think a script would be the go. This where I found out my ignorance regarding the insert command.

After some digging on the net I came up with parts to make this one:

-insert
A3BORDER_LAND_MECH=
Y
(command)

An explanation:

-insert ......just issues the insert command without the dialog box.
A3BORDER_LAND_MECH....is the name of the title block, and the = means that you wish to redefine it.
Y is the answer to the prompt "Do you want to redefine the block?"
(command) ....is a means of cancelling the script-does not make much sense but it works!

Just one catch-you have to put the location of the directory of the block in file locations in autocad. Go Tools/Options etc.

Just use the cui to make yourself a button and you just click when you want the block redefined.

Sunday, March 21, 2010

From igloos to elephants





More architectural monstrosities-yes I know the curves do not match, yes I know there does seem to be no means of support in some of these...but hey, it's Sunday and I have limited time!
I'm not quitting my day job just yet!
It is strange- this house design is supposed to be about olives (it is near an olive farm), hence the shape of the rooves, but things have ended up resembling upside down boats and elephants.
This is just a massing exercise. Sometimes you wonder what you need walls for out in the country-the only place I can think one might be needed is the toilet/bathroom and say a sound barrier if one had a baby...so the outer walls could be totally glass, but this means lots of dollars.Though if you were to have such a house, cost might not be an issue.

Wednesday, January 13, 2010

How not to learn Revit...


This is how far I have got, in between having a day off and putting unwanted stuff on the local internet market.

Two conclusions:
1. Putting in walls and windows in Revit: easy.
2. Constructing floor structures and roof structures:a bit harder!
When it came to putting in the floor structure, things seemed to go a lot slower for some reason-most likely because I was doing things for the first time, and did not realise there was a multiple copy. (There is, you just have to look for the checkbox).

I downloaded a roof truss from somewhere but things came to a bit of a halt when I had to alter the existing family. This was when I realised that I had not quite understood families and creating them. So I spent most of the day trying to make a sloped rafter, even getting as far as making a bird's mouth at the lower end, which caused quite a few problems.

Maybe I have missed something, but I would have thought that a plain old rafter would have come with the package. It probably is, but is called something like "Structural Effects".
I can see that the English are on to the fact that the Americans speak American. For instance a "notch" in English is "coping" in American.

It has been a frustrating experience, but just reinforces what someone has said previously:"You can learn by yourself, but you will take less time if you have training".

After the last try, I found my rafter coming through as an elevation in a plan view, so I tossed the toys out of the cot and went and mowed the lawn. (Yes, I do know what I did wrong!)

Maybe I'm like a lot of those crusty old Autocad users: Don't show me anything new: my mind is made up. It just seems working in Autocad is wonderfully precise and extremely flexible: you can quickly draw anything you want. It's just that it is not parametric.

I seem to be stuck in the family editor, doing things the "correct" way (by my way of thinking!)
only to be greeted with error dialog boxes saying things like "reference dimensions are no longer parallel " and so on. Going to Youtube is no good as the tutorials there do not cover a sloping item such as a rafter.

As an Autocad user, you find yourself keying in things like "M" for move, when you should be pressing a button. Visibility states are another minefield for an Autocad user: there ain't no layers!

When you finally find out a way to hide something, it's gone forever because the way to get it back is not the same button or next to it!

Monday, January 4, 2010

On a video roll

I've gone mad with the uploading of videos to Youtube. The latest is for
handrails to be found at:

http://www.youtube.com/watch?v=XIJ4ZNz3rhk

I hope that I'm getting better at doing these- a friend suggested I work on a smaller
screen size and have the autocad background set to white, which seems to produce
a much better result.

Now, back to that Revit tutorial....

Sunday, January 3, 2010

Xmas Madness continues

It's all too much: Xmas food, holidays, being able to decide what to do each day.

So the mad part is I have downloaded a trial copy of Revit to see what it is about.

Just to be totally inconsistent, I downloaded Java netbeans integrated development environment as well.

It just allows you to "easily" make java programs. That is, if you can figure out what the heck is going on!

Even worse, I have downloaded a screen video capture program called CamStudio and after much searching for a microphone produced a video. The trick (I have not mastered it yet) is to have the settings so that the file size is low. It is just a short 3 minute demo of my pipe lisp.

It can be found at:http://www.youtube.com/watch?v=nZsVUjbRWO4

Friday, November 20, 2009

Now Anyone can draw handrails












Finally. The baby has arrived. hrail.lsp that is. A difficult birth, accompanied by much wailing and gnashing of teeth. Just as well that I was forced to take some days off work, otherwise it might never have been done. Last weekend it was "finished", that is until I tried it out on a real drawing: it crashed and burned when the pline had an elevation greater than 0.
I'm quite surprised that I managed to debug it today and get it ready to roll. It was a neat feeling to see it doing it's thing in the end.
Which makes me wonder why I should spend my limited time left on planet earth doing stuff that I end up giving away for free? Probably just mad. Seriously, I have wanted one of these for years now-and if nobody else wants it, big deal: I'm going to get a lot of fun out of using it.
It's a bit like someone doing crosswords-just a bit of a challenge and exercise for the brain, and if someone else gets some use, good.
It makes use of a dialog box, offering use of 6 different types (see the previous blog). The idea is to draw a pline CLOCKWISE around the floor edge of your steel platform, issue the hrail command, make your choices, and pick the pline to get the results shown above.
I'm making the files available only by email request to gauge if anyone is interested.
See http://bilrocad.com/Lisps3d.html for instructions on use.
I can be emailed on bill@bilroCad.com










Monday, September 28, 2009

The Wunnerful World of Xrefs

Xrefs....love them or hate them? In my normal course of work, I do not really need to use them because most of my drawings are of simple things. Occasionally I have to do a large layout, so instead of cluttering up the model with sectional views, I write these out to separate files, which are in turn xreffed into an output drawing.

Recently a friend got me to check out how quick my computer was printing a PDF. His drawing was full of xreffed in bits and pieces. What was interesting, was that he was xreffing back into
the components, the main layout! So, when the layout was opened, I got a message saying "circular reference detected, breaking reference". He explained that this was the clever way to ensure that components ended up in the correct place. Clever indeed.

Recently, I have had a small tank and piping job to do for a consultancy. So I thought what a good place to experiment with circular references and so on. I knew of a thing called refedit, but never used it much. On this job though, I found that if you right click, there is an option to use refedit. I'm now convinced that this is the way to go, as you can use the geometry of the other things in the layout to position parts on a component drawing.

I think sometimes you can overdo xreffing-after all: you have drawn a pump - is it likely to change? No.

The set of drawings created makes much use of viewports using conceptual shading: try it, you will like it!

I was able to make great use of pip and pipeset lisp routines for this job (see earlier posts and my website http://www.bilroCAD.com for info). Of course the first comment from someone was "Does it produce a BOM?" to which the answer is no. Maybe one day.

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, December 22, 2008

Lisp, Using an incremental approach, and Variables

The Development Approach
1. Start simple.

2. Test it.

Once you have one bit working, move on to the next bit.

Don't try to write the whole program all at once, all in one hit. You will make mistakes, and
these are quite tricky to find with Lisp.

Make your first lisp routine 3 or 4 lines if you can. Leave the handrail generator for when you have 3 weeks off.

Looking for help? Try going Tools/Autolisp/Visual Lisp Editor. Once the Editor is up you can hit help. Someone at Autodesk is a smart one, because he put all the lisp commands under an aphabetical listing in the help section. Which is good if you know the name of the command.

Basics of Variables
What is a variable? Just a name, that you have made up, and you assign a value to.
This value might change over usage.

For instance, consider:
(setq the_length 22)
The minute Autocad sees this it says "Aha! that variable the_length, it has an integer value of 22!" You may not know what an integer is. It is definitely nothing complicated, all it means
is it is a whole number. So for instance 22.23 would not be an integer.
Just a trap for young players here....do not use variables like angle or length. These are already
reserved for Autocad's own use and causes trouble if you do (Yes...I am guilty!)

How about:
(setq the_layer_name "Fred")
Here, the variable is being set to a string (whats a string?-just a bunch of characters)
You could change this in the course of the program by going:
(setq the_layer_name "Sam")

Naming of Variables
I'm afraid I have been a bad boy as far as consistency is concerned here: I seem to choose
whatever takes my fancy at the time. Sometimes I like running all the letters together, for
instance thelayername. Other times I go the_layer_name or TheLayerName.
Just remember lisp does not care about upper or lower case so just choose the system that
suits you best. But remember: One day you might have to read your own program back,
and having variables like "e" or "b" or "updown" won't make a lot of sense.

Get a peer review
At one stage I had written a 3d stair generator, which I was intensely proud of.
Until I gave it to a friend, who kindly pointed out that it did not compute the stairs he
thought it should be able to. He was right. I was wrong. But I went away and corrected
it and now it goes nicely. I hope to post this over the Xmas period, along with some other
ones.

There are good books out there, I bought one (Woops in 1992!) called Maximising Autolisp
by Rusty Gesner and Joseph Smith, and I have had good use out of it.

Monday, December 24, 2007

The user interface for Autocad

Over the years of using Autocad, I have often found that I have gone for the easy way out. I refer of course to the ability to have toolbars, tool palletes and so on.

These are fine, but tend to gobble up screen real estate, hence my use of a dual monitor setup. Even then, this gets to be a long travel for the mouse, so the view toolbar ends up on the main monitor along with the ucs on etc.
Not smart, which is why I have a 20" monitor.

Other draftees I know have a minimalist approach and have NO toolbars ever and regard me as a slightly mad person.....So maybe this year it is time to change my approach and have a humdinger of a pgp file going.

Which makes me think: how is the best way to do this? I had come across one guy who was left handed. He had a clever plan: every command was assigned a number. This meant he could rest his right hand on the keypad, and hold onto the mouse with his left hand. Seemed pretty clever. Unfortunately I am right handed so nuts to that one. He must have had a good memory!

My coworker uses a keyboard for all commands and has remapped things so that where his left hand rests on the keyboard is where all the common commands are kept--ie something like "a" for "zoom".

Maybe I could use a similar idea--left hand is the one only on the keyboard, and somehow remap the enter key onto the caps lock key. Then all the main keys would be qwert, asdfg, zxcvb. Which gives only 15 commands--obviously not enough. Doubling up could give 15 x 15= 225 enough? ie qw qe qr and so on-- But how to remember all this...ouch.

Would this setup cause RSI-I do not know....

I thought 225 would be fine---that may be ok because some commands are so obscure they are never used---I had a quick check of the standard pgp file- it is about 350 commands.

It would be nice if Autodesk has ever figured out which commands are the most common--ie what are the top 15 and so on.

These would be my most used 15 commands: line, circle, dtext, arc, move, copy, stretch, explode, block, wblock, edit text, dimension, leader dimension, layer, rectangle.

Then I could have the fun of struggling to remember all this for the first 2 weeks back at work. Must be mad.

Saturday, September 8, 2007

September 9, 2007

Where do I start? Is there a target audience? I would hope my target audience would be interested in things to do with drafting and usage of Autocad. At present I am working for a large by NZ standards company as a contract draftsman, so I guess I should be circumspect about what I do say.



These last two years have seen a quantum leap in Autocad. With R2007 we have been delivered such wonderful goodies as presspull, sweeps and lofting. Not to mention such things as Section Tool and Flatshot.



I have been given the chance to draw a part of large food processing plant upgrade. To this end I have employed Autocad in 3D.



Because it is such a large model, I have split it into several models and then Xreffed these smaller ones into one overall "Big Momma". Luckily, I have bought a "New" computer ---not the hottest and bestest, more a middle of the road one---Core Duo-the top end one and a FX1500 Quaddro card. I am quite happy with this combination....but it always could be faster!



My technique for attacking the sections of the various models has been to
use the section tool and write block out the sections to a file of their own, eg called SectionAABagFiller.dwg. Then I create an "empty" drawing -ie just a title block saved as say 5046-112 Sections.dwg. In this drawing I xref in the section view just created, and then put on my annotation in model space. This one file may have many tabs on it and xref in several sections.



The huge advantage this technique gives, is only apparent when there are changes (The one thing a draftee can ONLY be sure of!).



If there are, you change the model, then regenerate the sections. Voila! All the sections in the sections drawing are updated automatically.



I cannot claim this as my own idea, as Autocad Architecture uses a similar system. (Not quite the same)



No doubt whoever is reading this knows that all draftees have their own funny ways of doing things. Seems I am no different, as there will be those out there that use 3DClip to achieve their automatic updates.



My feeling is now that the sectioning tool produces clearer sections.



I guess it all comes back to the problem: Is is necessary to produce something that can be admired for its graphic style, or is it better to just use the cheapest, easiest fastest method? (As long as the drawing can be understood)



In the past, I have probably steered towards the cheap and easy. Now retirement is on the horizon, I finding myself veering towards the "better looking is better" idea.