Tick Talk on EsoxRepublic.com

Esox “Copy Custom Info” revived and updated guts

Posted in API, Esox Software, Software by Administrator on the May 1st, 2010

You just never know how popular some things are until they break.  This apparently is true for my “Copy Custom Info” macro.  The macro seems to have stopped working for many SW 2010 users.

The macro is ancient, by API standards.  It is one of my first published macros, and was written in SW2003.  Judging by the code, I wrote it before I was aware of early binding.  Also, SW’s API has come a long way and there were many ways to streamline the code.

I was able to do away with much embarrassing sophomoric hacksmanship. Glad to get that behind me.  Most notable improvement is that the program no longer needs to make duplicates of the files it is copying from (do not judge, I had my reasons!).  Assemblies and drawings selected for copying will open much faster.

The interface is about the same.  The only visible improvement will be in the preview windows.  There will be some indication that this is the SW2009 version.

The program will be posted on EsoxRepublic.com in the coming week.  Notices to be placed in popular forums that your less-popular author frequents.

SW BOM to Excel Macro

Posted in API, Esox Software by Administrator on the September 11th, 2008

…not quite, but a fast way from here to there.

I just released a macro I have been using for a few months. “Copy BOM to Clipboard” macro does exactly what it says: it copies a table-style BOM from a SW drawing to the clipboard in a format that can readily be pasted into MS Excel. Download here.

Just run the macro with a SW drawing open. If successful, there will be a message like that shown below. Then go to an Excel worksheet, select a cell, and paste (”ctrl-v”).

BOM to Clipboard message window
Message box indicating successful acquisition of BOM.

Developer’s notes

It’s been a while, but I am trying to remember some of the specific challenges of writing this. It took about two hours of fumbling until the error-to-trial ratio dropped below 1.0.

Application writing is often mostly about validation. Checking to see if there is an active document, is it a drawing, does it have a BOM (or more than one). That took most of the time.

There was a hook to getting ahold of the table data. I put the BOM data first into a SldWorks.BomTableAnnotation object, then moved it to a SldWorks.TableAnnotation object which could then be parsed into an array. The final array is then written to a tab-delimited string which pastes so nicely into Excel.

It could have been more elegant, but it “works fine, lasts long time”.

Thought for the day

Speak softly and carry a big stick. Some folks out there can take a punch much better than they can take an insult.

New SolidWorks Where-Used Tool

Posted in Esox Software by Administrator on the August 7th, 2008

EsoxRepublic.com has released a new where-used tool for SolidWorks. This new stand-alone application was created to fill in a gap caused by the undependability and inflexibility of the Windows Indexer-driven SW Explorer where-used search.

Annotated screen shot of Esox Republic's Where-Used tool
Annotated screen shot of main interface of Esox Republic’s newly-released Where-Used application. (Click image to enlarge.)

Succeeds where SW Explorer fails

As with most of Esox Republic’s freeware, this one was born from necessity. In many cases, SW Explorer was not finding all where-used references when performing rename, replace, and Pack-and-Go.

The main reason for SW Explorer’s failure in where-used searches is that SW Explorer relies on Windows Indexing for its searches. Windows Indexing provides a list of files and references to SW Explorer. More often than not, that list is incomplete. This is especially true for netwotk folders.

Also, SW Explorer does not allow one to tailor the where-used search. One can not add or remove folders from the search area, nor can one specify reference types or file types searched. Esox Republic’s Where-Used tool can do these things.

Esox Republic’s Where-Used application is driven by SW API’s Document Manager object. The SWDM performs a “hard-target, house-to-house” search of all files for its where-used searches. The result is the most current where-used results possible.

The downside is that it is a bit slow. Checking files takes much more time. Still, if accuracy and flexibility are more important, here’s your tool. The program is available only as an .exe, due to SWDM licensing requirements.

Search results
Search results

Other news…

Birth announcement

There’s a new member of Tick’s clan. Falco William Henry was born July 15, 7 lb. 6 oz., 3rd of 3 boys.

Thanks Matt & Matt

Thanks to Matt Lombard and Matt Lorono (SolidWorks Legion) for including links to my blog into theirs. Naturally, I will be returning the favor.