Monday, November 16, 2015

Autocad Dimension Crazy!

Well, maybe not crazy, but a little irritating.

I have just gone back to by old work for a short time to earn a few dollars to pay for a tooth that fell out.

The man who took over from me is an engineer, and while fairly familiar with Autocad, it was not his main thing for most of his career.  He tells me that he finds drafting is a nicer job than being an engineer.  Let's hope this remains the case!

The task he has partially completed is enormous in size, covering several levels of plant and several buildings.

They also had  a friend of mine filling in for a time, so I have been opening up some of their drawings and working on them.  Their drawings are fine, except for one thing: dimensions.

In the past, I would open my template drawing, draw the model in modelspace, jump out to paperspace and start dimensioning with my 1:1 dimension style.   It did not matter what zoom factor the viewport had, it would always give the correct dimension.

Now I find that I have to set dimlfac to whatever the viewport zoom factor is.  This is a nuisance, especially as I had no firm idea what the problem was.

A little bit of research on the net and things became clear:

If you set DIMASSOC to 2, Autocad will take the zoom factor of the viewport into account when filling out the dimension.

I have raved on about zero height text in a previous blog, here:

Nowadays, If my dimensions and text are not to my liking I just blast the drawing with 2 lisp routines:

1. DS.lsp which is in the link above, a simple routine, which I have extended below  a bit to cope with the various text styles I did come across. All the things after a ; are comments to explain things

(defun c:DS()
(setq skale (getreal "Please enter the plotted scale: "));get a scale from the user and assign it to skale
(command "-style" "STANDARD" "ARIAL"
                        "0" "1" "0" "" "" );issue the style command and make it Arial font

(if (tblsearch "style" "ROMANS")(command "-style" "ROMANS" "ARIAL" "0" "1" "0" "" "" ""))
(if (tblsearch "style" "R1")(command "-style" "R1" "ARIAL" "0" "1" "0" "" "" ""))
(if (tblsearch "style" "R1-25")(command "-style" "R1-25" "ARIAL" "0" "1" "0" "" "" ""))
(if (tblsearch "style" "R2")(command "-style" "R2" "ARIAL" "0" "1" "0" "" "" ""))
(if (tblsearch "style" "R5")(command "-style" "R5" "ARIAL" "0" "1" "0" "" "" ""))
;;;the above just checks out the other styles in the drawing and sets them all up to zero height text

(setvar "MIRRTEXT" 0) ; hard to believe - some people set their mirror command to be a bit silly
(setvar "DIMSCALE" SKALE); so if you typed 1 as the plotted scale, dimscale gets set to 1
(setq the_textsize (* skale 2)) ;setting a variable up to be used next line ie if dimscale= 2
;the textsize will be set to 2 * 2 = 4
(setvar "textsize" the_textsize) ;the system variable set to that value
(setvar "dimassoc" 2); will take the zoom factor of the viewport into account
;funny, I had forgotten I had put this line in a zillion years ago!
(princ);exits quietly
);end of the defined function

2. The other lisp is called Dimlo.lsp
;imports a dummy block containing a set of dimension styles
(defun c:Dimlo()
(command "-dimstyle" "r" "STANDARD")
;sets the current style to STANDARD
(command "-insert" "dimstyles"  "0,0" "1"     "1"       "0"); inserts a block called dimstyles
(command "-dimstyle" "R" "1-1");issues the dimstyle command and restores it to 1-1
(command "erase" "l" "");then erases the block from the drawing

The block called dimstyles is just a rectangle (just something to fill in the drawing-,may not even be necessary), but in the drawing all the dimension styles normally used are set up, eg 1-1, 1-2, 1-5 and so on.  Normally in paper space you would use 1:1, so very little setting up is needed.  Sometimes you have to put dimensions in paper space, so you can choose 1:2 if you need to from the dimension styles pull down.

There is no reason why you could not make up such a block and get all your dimension styles all set up in that one block.

This is close to the idea of a virus used in Autocad, but in a good way!

The only problem is that it illustrates how easy it is to get away from how Autocad works using automation, ie lisp routines, to accomplish a simple task, and how strangely rooted in the past some people are. this command came out in 2004.

Other not recommended things are clicking on a dimension and changing it's value; This should never be done! The reason is anyone coming into your drawing will find this (if they are lucky!), then will not trust any of the other dimensions.

As for exploding dimensions-very naughty!

I have been thinking about putting all my lisp routines on a new web page, probably around Christmas time.  If you are keen for that, post a comment. If nobody posts I may get lazy and not do it.

Thursday, July 30, 2015

Much Posting on Youtube

Today is my last day on Autocad Subscription.  If I had found some drafting to do at home for money, then most likely I would have paid up to keep the suite going.  I had thought that by now I would be happily (?) drawing houses in Revit, but it appears I am not suitable for this as I have not got 2 years architectural drafting experience(I have 9 months experience drawing houses).
Mechanical drafting jobs seem elusive as well.  It could be an age thing as well.

So, turning my thoughts to making a little money to help the retirement along, I thought a series of Autocad tutorials would be the way to go.  If they proved popular, I could clutter up the beginning like everyone else does with an advert.

I came across a free video recorder called "Screen Cast O Matic" , found at

This is very good, the only catch is that you are limited to 15 minutes- not a big deal anyway because most people can only stand watching something like a tutorial for that long anyway.

Lesson 1 is to be found on Youtube at:

I thought 5 tutorials would be enough, but I seemed to rave on to produce 15 in total.

Towards the end I did a short piece on rendering, here is a sample:

Not to imply that this is the cutting edge of rendering, but to show part of the platform I drew as part of the lessons.  I did a short bit using Autocad 2016 rendering, and was a little disappointed in my results, but that would be me not exploring every setting.  The last video, No 15 shows the Autocad model being brought into Revit, and Showcase, both of which were easier to get a render out of.

Sunday, January 11, 2015

End of an Autocad Website

My site has just expired.  My original idea was to make a small income from posting blocks, lisp routines and so on.  I did make $2.89 or so.  After a few years, I did away with the advertising.

My apologies to all who requested info regarding lisp routines and had no reply from me.  I guess I just had other fish to fry.

I am in the process of learning Revit, but have a feeling that I might be too old to catch on to this fish.

It is an amazing program in some ways, any fool can put together walls, doors, windows and roofs.
The fun begins when you want a roof that is not just a slab of butter (easy), but a composite made up of tin, purlins, and wooden trusses.  Can be done, as shown below:

This is the same building I had a go at 4 years ago, see

I have made slightly more progress this time, but things are still taking way too long, which will definitely be my unfamiliarity with the software.  It took 7 and a 1/4 hours to get the basic shell up and going with a start on the floor joist layout made, which compares favourably with the 4 weeks it took to do the whole job in 2D Autocad,  I made the decision way back then to keep everyone happy and use 2D.  Bad decision. It takes forever!

Things I like about Revit are:

1. Make a change in one thing and everywhere it appears gets updated automatically.   If you have ever made changes (what? a draftee who never made any changes?), then this alone is worth all the pain of getting your thinking in line with the designers of Revit.

2. Any sectioned items are hatched automatically with the appropriate hatch pattern.

3. You can make up the equivalent of an Autocad block, but it is in 3D. You then change its parameters when inserting it in a drawing.  For instance, I made the trusses above, then just adjusted the span and slope to fit this location. Laying them out is a bit more frustrating.

Things I am having trouble with (abeit in a very low state of proficiency):

1. Sometimes you cannot just change the size of a family, say a window width, Revit will let you do it then spit the dummy after it fails to work.

2. The famous "You are not putting this in at the correct level for this view".
It is not good that at this stage of it's development, you have people still wondering how to fix this.
Would it not be nice to have a thing that told you what level you were putting things in at?
(Yes, the panel on the side, silly.)

3. Yup, you sure can dimension whole walls at a time.  Just try deleting one of the dimensions though. According to the experts on the net, just hover over it and hit tab, then delete.  Does not work for me.

4. How do you get an endpoint of a  line that is vertical to snap to a nearby point?

5. Why do you have control over material hatching only in coarse mode....what about fine????

6. Ok, you can have visibility of certain items, so for instance if you were doing floor structure, this is great:  Just turn off all walls and floors and draw in timber framing.  The problem arises when you have a mixed timber and concrete floor and you put in a concrete block wall....

7. Sometimes it does not regenerate other views after a change.

Anyway, I now have a book on Revit (thanks, Robin!), so magical things might happen....