CADtools – the early years

This post is to clarify what I’m talking about in my Survey. These are some of the tools I have been using for a few years. I’ve handed them around to a few colleagues I have worked with over the years and they seem to find them handy.

Any tools I release commercially would be a lot more sophisticated than these. I just put these together for my own use and generally stopped coding when they stopped breaking and did what I want them to do.

My first Find and Replace tool
My first Find and Replace tool. I wrote it because I got sick of the 3 tab-stops between the text fields in the native one. I also wanted to manipulate more attribute properties. This version doesn’t preserve the values of the attributes when you change their TAGs. The release version would preserve them. Oh, this does text too – I left that bit out of the UI but it works. See what I mean about a little rough around the edges?

 

 

Generates a sequence of attributes

I wrote this Attribute Generator to generate series of attributes, rather than copy ... click ... edit ... copy ...click ... zzzz. As you can see I'm no UI expert. It ain't pretty but it has saved me a lot of time over the years. The settings at the top-left are for generating ACNE-compatible attributes. It also generates in the correct order so you can bulk-select them and they will be in the correct order when you make a block of them. As you can see, I lost interest when it cam to making them different colours.

 

some tools I have butchered in LISP

LISP isn't my favourite language but I've written (and butchered) a few routines that speed up my day. Quite a few of them are modified versions of the inbuilt ones (BX-BI is ATTOUT-ATTIN with a lot less clicks). I have far more sophisticated versions in the works.

 

As it stands I have a ton of ideas logged in my FogBugz tracker and some of them are partially coded. I posted my survey to assess the viability of developing these with a lot more finesse to sell them, or should I just hack them together for myself?

Please, let me know by taking my survey.

CAD tools survey 2011

For an explanation of the sort of tools I am referring to in this survey, please see http://www.cadbloke.com/cadtools-the-early-years/.

Thank you for your time spent completing the Survey. Please don’t forget to click “Submit”.
My contact links once more with proper links … If you have any suggestions or questions for me (CADbloke) then please feel free to

A summary of the results of this survey is published at http://www.cadbloke.com/cad-tools-survey-2011-results/. It will update automagically as more responses are received.

If you have a suggestion for a CAD tool you want to see please add it, and vote for them at http://cadbloke.uservoice.com/forums/130553-cad-tools-i-want-to-see

AutoCAD Layers are not Layers

Layers must be one of the most misnamed things in AutoCAD.

The one thing that AutoCAD “Layers” don’t do is actually layer objects. This is controlled by the Draw Order commands. That’s what I mean when I say “Layers” are not layers. They are nothing at all like the olden-days concept of drafting on transparent paper and layering them on top of each other.

AutoCAD Layer Manager

AutoCAD “Layers” should be called Collections, or Bundles. They are a way of grouping objects (lines, blocks, text, whatever you like) together so you may easily adjust properties they share. The most obvious and prolific use is color. When you set the color property all of the objects on a “Layer” to “ByLayer” then you change the color of everything in that “Layer” simply by changing the color of the “Layer”. This is ultra-handy because it centralizes object properties you want to tweak, en masse. If you want to change the color of video cables in a drawing from blue to pink, you only need to change it in one place – on the Video “Layer” in the “Layer” manager.

“Layers” also work inside blocks. Anything inside a block that is not on “Layer” 0 (zero) is a member of the “Layer” it is assigned to and will change along with everything else on that “Layer”. Layer 0 (zero) inside a block is a whole other topic.

CAD tools survey 2011 Results

I posted a survey at http://www.cadbloke.com/cad-tools-survey-2011/  to assess the feasibility of releasing a few of my custom CAD tools into the wild. If you haven’t already done so, could you please help me out by completing the survey? For an explanation of the sort of tools I am referring to, please see http://www.cadbloke.com/cadtools-the-early-years/.

If you have any suggestions for CAD tools you would like to see then please add them at http://cadbloke.uservoice.com/forums/130553-cad-tools-i-want-to-see

It may strike you as a little odd that I would be so open about releasing this info but that’s the way I like to do things. I’m not a fan of keeping secrets just for the sake of it. Also, I believe that your time spent on helping me out should have some payback, and here it is…

This page will automatically update when more results come in so, if you’re interested, come back & see how it’s going.

Here are the results

Thank you once again for helping me out with this survey. If you haven’t already filled it out, please add your thoughts at http://www.cadbloke.com/cad-tools-survey-2011/ .

If you have any suggestions or questions for me (CADbloke) then please feel free to leave a comment below or, alternatively, get in touch with me at http://www.cadbloke.com/contact/ or via Twitter at @CADbloke or on Linked-In at http://www.linkedin.com/in/cadbloke

If you have a suggestion for a CAD tool you want to see please add it, or vote for it, at http://cadbloke.uservoice.com/forums/130553-cad-tools-i-want-to-see

AutoCAD Find and Replace Wildcards are broken

I found this bug when doing a find and replace on some IP addresses in an AutoCAD drawing. I was using it as a template for a new drawing so I wanted to reset the IP addresses to a default to avoid duplicating the existing values.  Here is what I started with …

so far, so good

So, I fired up my trusty AutoCAD Find and Replace window, like thus…

AutoCAD Find and Replace window. Finding *.*.*.* and replacing with xxx.xxx.xxx.xxx

… and then selected the block in question & hit Replace All. I got this …

Not the desired result. Huh?

That ain’t right. I tried the same thing in Excel. From this …

Same procedure in Excel, before

… using the same Find and Replacement text …

Excel Find and Replace Window

… and I got this …

Replacement in Excel - ah, that's better

That’s more like it. To paraphrase Sesame Steet, “One of these things does not work like the other ones.”

So, why are they different?

Initially, I thought the difference was that Excel’s search is greedy and AutoCAD’s search is an inconsistent mix of lazy and greedy. Here is an explanation of the difference between lazy and greedy text searching, as it pertains to using Regular Expressions. In a nutshell, a lazy search reckons it is done when it has found the bare minimum it needs to satisfy the requirements of the search. The * wildcard I used in the find section will match one or more of any character. A lazy search reckons it’s done when it matches one character, a greedy search will keep matching characters until it eventually runs our of ones that match the search string. In Excel’s  case it stops when it gets to a dot, in AutoCAD it did that with the middle but not at the beginning and the end.

The more I looked at it the more I realised that isn’t right. AutoCAD had actually ignored the first and last wildcards in the search. Instead of looking for *.*.*.* it has looked for .*.*. As Occam’s Razor inevitably predicts, it’s not as complex as I first thought – it’s simply somewhat broken.

I’d say that’s a bug, folks. I guess I’ll be using ol’ faithful Excel for that find and replace exercise. Well, actually, it’s not that bad – the ? wildcard still works so I can use ???.???.???.??? in various number of ?’s to (eventually) get there. It’s still a bug, though.

ACNE and the case of the Missing Cable Numbers

from http://www.flickr.com/photos/wilhei/109403306/OK, I’m staring at the drawing and I know all the blocks and attributes are right. I have run the drawing through ACNE more than once and I get the same result: some of the cables are missing from the cable schedule. Why?

This is an easy mystery to solve but a PITA to eradicate. The problem is that the block has been changed in some way but has not had the ATTSYNC command run on it. The attributes in the (original) block definition don’t match the ones in the insertions, the copies of the Definition that you can see.

So, to fix it, go through the motions of the ATTSYNC command. If you’re using AutoCAD LT then this command was introduced in the 2010 version. Older versions don’t offer it. If this is your dilemma, try Ctrl-C copying the whole drawing and pasting into a blank template, then use the new drawing you just created. Be aware you will lose any uninserted blocks if you abandon the old drawing. I can’t guarantee that will work because I don’t have a copy of LT to try it out on.

So, why is the ATTSYNC problem a PITA to eradicate? Well, how many blocks in your drawing set need ATTSYNCing? How can you be sure you’ve fixed them all? Also, be aware that ATTSYNCing moves all of the attributes in every occurrence of the block back to their originally-defined positions. If you have spent hours dragging attributes left, right and everywhere to make them line up then this will break that. That’s the main reason I don’t advocate moving attributes away from their defined positions – you paint yourself into a corner. Don’t do it.

Page 1 of 212