Ino Detelić

AutoCAD command statistics

Last year I wanted to improve my drawing speed in AutoCAD so I needed to have the statistics of the most used commands.
With this data I could decide which icons to keep on the screen and which keyboard shortcuts and aliases should be easier to execute, so I could draw faster, but I wanted to see the objective data, and not trust my guts on this one.

Here’s what I did: I made AutoCAD log all the commands on a file and then use a script to count the number of times each command was executed.

First you need to enable command logging with the LOGFILEMODE 1 command. AutoCAD writes the .log files on the %AppData%\Local\Autodesk\AutoCAD 2008\R17.1\enu by default and you can change that in the options under the ‘files’ tab.
AutoCAD will write a separate log file for each drawing you open, so after a while you’ll have many log files with a lot of command data.

For counting the files I asked the internet hive-mind a question on and Joey came up with the solution to use PowerShell. I had never used it before or knew how useful could it be.

So you just run this PowerShell script from the same folder as the .log files and it gives you every command you used and the number of times you used it.
I had 622 .log files in there, so the script took a minute or two to complete.

Perfect! Can you guess the most used command?

Yes, its *CANCEL*. My father, an architect who began working on AutoCAD still in the 80s uses a tablet to draw, and he always had the keyboard ‘esc’ key mapped to one of the buttons of the puck (tablet mouse). That was really smart. I also began drawing on tablets but when I shifted to using the mouse, I also mapped the ‘esc’ key to a mouse button. This is the single most important productivity enhancement out there. And if you map it using the mouse software, it works on other programs.

Now the gathered data.

To my surprise, the second most used command was ERASE, so I immediately mapped the ‘del’ key to another mouse button and just hours later I was deleting stuff faster than ever (And I carried on using it on every other program where the del key is useful and one of your hands is on the mouse like 3ds max).

You can see that I only use the TRIM command and no EXTEND. This is because I use the shift modifier key on TRIM to extend objects. This way you never have to think about it.


Posted on December 14th, 2011 under CAD

Avoiding slow TRIM and EXTEND in DraftSight

In AutoCAD, EXTEND and TRIM are two of my most used commands and for I normally use them with the “select all” so I can keep extending an trimming without thinking what was selected or not.

This soon became a problem in DraftSight, as the TRIMs and EXTENDs were getting slower and slower to a point where it was no longer usable as the drawing was getting bigger, so I tried to find out why that was happening and I discovered that AutoCAD and DraftSight process the command differently.

Autodesk has some tricks that make these operations faster:

  • AutoCAD only takes into account the objects that are inside or near the display area;
  • AutoCAD doesn’t calculate trims for dimension objects.


DraftSight, on the other hand, computes all the objects, including dimensions in the drawing, not just the area you’re currently viewing. That’s why it TRIM and EXTEND on DraftSight is slow, especially with large drawings.


The solution, if you don’t want to select the objects for trim and extend, is to hide or lock the object heavy layers you won’t need for the trims and extends you’re doing, such as dimensions, vegetation, symbols and equipments and appliances.


Tip : you can use the LAYISO (layer isolate) command to select only the layers you need and LAYON (Turn on all hidden layers) or LAYERP (Previous layer status) to get back without having to go to the layers dropdown or manager.

(In reality I only use a custom TRIM with an enter to select all, and for EXTEND I press the shift key, so I never really use the EXTEND command)

Posted on December 13th, 2011 under CAD

Designing the perfect pagination for mobile web

Pagination on mobile is usually done with infinite scrolling or a ‘load more’ button when you reach the bottom, but when you’re required to use a pagination element, how do you do it?

A good pagination should provide:

  • previous and next page links
  • the total number of pages
  • first and last page links
  • current page number
  • a quick way to get to an arbitrary page number


The problem here is you want big buttons that are easy to click, but they take space and you don’t want to lose any functionality, so the common  ‘«first «prev 12 13 14 15 of 28 16 17 18 next» last»’ pagination is too bulky for use in a mobile touch screen.

To solve this problem, I merged some points shown above to save space without compromise in functionality. Starting with the common

«first «prev 12 13 14 15 of 28 16 17 18 next» last»

the ‘«first and last» page links’ can be merged with the total number of pages simply by transforming them into a numerical link. That leads us to

«prev 1 … 12 13 14 15 16 17 18 … 28 next»

which is shorter with no loss of information or functionality.

Now the ’12 13 14 15 16 17 18′ links give us the current page number and some control to get to nearby pages. Notice how 14 and 16 function the same as «prev and next» links, repetition which is fine on desktop with lots of space, but for mobile we have to cut redundancies like these.

In order to save space, we can replace the whole ’12 13 14 15 16 17 18′ portion with either a dropdown <select> tag or a numerical <input> field which default to the current page number. Both work well even if you have a large number of pages because the iPhone and android browsers have good dropdown selectors.

note: If you’re using the input field, don’t forget to specify type as number so the browser shows the numerical keyboard.

This is the pagination I ended up with:

Large buttons, prev and next links, visual representation of current page and total number of pages, first and last page links and the possibility to quickly go to an arbitrary page number, all in 5 buttons and an input field. I could have also done it with a dropdown <select>.

Also notice how the previous page and first page links are greyed out and they do nothing when you click on them, and how the input field and go button are bundled together.

Posted on December 3rd, 2011 under random

Redesign of

The client wanted the new website to display beautiful imagery and a theme reminiscent of earth and geology.
The old site had a smaller centered cycling banner image which I decided to remove in favor of a big image that would span across all the header, no matter what resolution you’re using.

Posted on December 2nd, 2011 under design