Miserable

It’s not often that some piece of software makes me miserable, but over the past few weeks I’ve been subjected to an example of exceptionally bad software and I’m near breaking point. The culprit in the spotlight is EzCad3 (pr. “Easy CAD”), a graphics tool intended to control laser etching/cutting hardware. In fact, the version I have is a slightly customised (i.e. feature deprived) derivative of the official EzCad3 but I won’t mention the name as the suppliers of this kit are not to blame for the shoddy software. That honour belongs to the Beijing JCZ Technology Company, Ltd, who were founded 20 years ago and should know better by now.

EzCad3 is a 64-bit Windows application and it has reasonable implementations of all the 2D/3D features that you’d expect from something that controls some expensive industrial equipment. All the usual object manipulations, specific object types (barcodes, vectors, bitmaps etc.), extensive 2D hatching (think “planes”, including the “ink” of text) and more. It also has an impressive list of laser equipment it can support, including the fiber laser that I’ve been tasked to automate.

The problem is with the interfaces, both the UI and the SDK. The latter I abandoned because it is far too low-level. I am not trying to reinvent a CAD tool, I just want to pump some content into a template, resize any bits that go out-of-bounds, and start the laser marking process. I don’t want to be down at the level of directly manipulating the head axes, motors, energy source etc. So instead I want to have the automation up at the CAD level, where I can load objects, set their properies, arrange and orient them, then hit “go”.

Not possible, it would seem. Well, not normally possible, but if you are willing to sell your soul there are ways.

I’ve had to resort to emulating the gesures of a human user: mouse movements, clicks, keyboard interactions etc. This would be less of a nightmare if EzCad3 was consistent in its UI and at least provided a keyboard version of every action that currently requires a mouse. Sadly, it does not. In fact, very few of the mouse operations have keyboard equivalents. Some of the operations have menu equivalents, which can be navigated to via a sequence of keyboard right+down operations, but many are missing. Even using direct access to the underlying Win32 controls doesn’t always work. For example, there’s no way to select a particular object in a CAD file via the keyboard, and sending “select” commands to the ListView control merely causes the items to be highlighted, but crucially not selected. Without being selected, I have no access to the fields that can be used to set properties like the X,Y coordinates. My solution was to simulate a mouse click within the control at the position (possibly off-screen) where the object would be listed.

I have spent weeks creating Win32 automation work-arounds for many of the deficiencies in EzCad3. Today, for example, I found a work-around for the fact that it won’t refresh text from its source file. (Think “mail merge” but with CAD data.) I discovered that if I have a group of text objects that are bound to a source (e.g. a text file) and I apply a hatching to the group, EzCad3 will re-load the content from the text file(s). This is good because then I have the text objects set to the size that the loaded text dictates, and I can inspect the object properties to see if any are wider than the engraving zone, and resize if necessary.

An hour or more can go by while I bash my head against what appears to be an impossible problem, and then by accident I find a way past, only to be hit by the next speed bump.

The journey will end, hopefully soon, but it’s so, so miserable.

(Yes, I might document my findings, but not until I’ve had time to recover.)

Categorised as: Coding, Technology

Comment Free Zone

Comments are closed.