Autodesk Discussion Group Facelift Offer

My participation in the Autodesk discussion groups (http://www.autodesk.com/discussion) has been severely curtailed since the notorious “upgrade” a few months ago. One of the many problems introduced by the upgrade is the loss of formatting. It’s now virtually impossible to post messages that include inline AutoLISP or ObjectARX code without them being reformatted into unreadable garbage. Even attaching the code as a file is difficult (the “solution” is to rename files with a .txt extension!) As a result, many queries for programming help go unanswered. Autodesk has made an attempt to provide a fix (http://discussion.autodesk.com/forums/ann.jspa?annID=125), but a survey of the posts in any of the programming groups shows that it’s not working. [Thread has been removed by Autodesk, so link was changed to point to archived thread.] The recently announced layoffs and related cost cutting measures at Autodesk have dimmed my hopes for a resolution. Therefore, I’ve decided to offer my services to fix the problem. Autodesk, I’m offering to donate my time to fix your discussion group software. Just give me access to a development and testing platform, and the right to modify or rewrite the code. Readers, can I get an “Amen”?

January 28, 2009 · 1 min · Owen Wengerd

AECOPEN Utility

James Maeding of Hunsaker & Associates contacted me recently about an irritating problem that his users have with the AECOPEN command in Land Desktop. The AECOPEN command replaces the core AutoCAD OPEN command in AEC verticals. The problem they have is that AECOPEN displays an initial project dialog that requires users to press a [Browse] button to open the file browser dialog. Since they want to browse for a file every time they use the AECOPEN command, James wondered if I could create some code to automatically “press” the Browse button every time the AECOPEN command is issued. I whipped up a little utility for AutoCAD 2007-2009 based products to do what James wanted, and it is now available on my freebies page as AecAutoOpen.zip. When the ARX module is loaded, AECOPEN behaves as if the user had immediately pressed the [Browse] button on the project dialog. If the [Ctrl] key is pressed, AECOPEN reverts to its original behavior. Why not just use the built in OPEN command instead? The AECOPEN command has some important side effects, according to James.

January 24, 2009 · 1 min · Owen Wengerd

Missing Menu Madness

One of my many complaints about about the CUI system introduced in AutoCAD 2006 is that it's not very friendly to third party developers. In my opinion, it's not very friendly to end users either, but I digress... One example of the unfriendly CUI is the case where a third party application installs a partial menu. In the pre-CUI days, adding a partial menu was an easy way to add an application specific menu to AutoCAD without making any changes to the end user's existing menu files. If the application was later uninstalled, the uninstall script could remove its menu and clean up the registry, leaving no trace behind. CUI breaks that scenario. ...

December 22, 2008 · 2 min · Owen Wengerd

Design File Locking and Snake Oil Security

The increased sharing of electronic CAD data (ala BIM) holds a lot of promise, but it also exposes companies and individuals to additional liability and risk. This additional risk is coming into focus more and more as actual cases of costly legal battles confront engineers and architects. The June 2008 AUGI wishlist results contain “Design File Locking” as the top wish by a substantial margin, and Shaan Hurley lists it as number 3 in the AU 2008 AutoCAD wish list (http://autodesk.blogs.com/between_the_lines/2008/12/au-2008-wednesday-autocad-wish-list.html). Clearly, interest in file and IP security has been growing steadily. As demand for IP security grows, there are sure to be snake oil security vendors trying to cash in on it. I received a spam email a few days ago from SafeNet, Inc. promising “a cost-effective and easy to integrate solution that provides reliable and effective security through the use of digital signatures.” Whenever I see such statements with a long string of buzzwords, my snake oil alarm goes on alert. Digital signatures are for authentication and establishing trust – they cannot and do not provide “reliable and effective security”, although I suppose they could be used by a system that does. In the last year or two, a number of companies have claimed to market software that “secures” AutoCAD DWG files. When I see such a claim, it invariably refers to software that creates an anonymous unequally scaled MINSERT entity. These can be created or “exploded” with a few lines of AutoLISP code. Frequently these companies claim to “encrypt” the drawing, which may sound sexy, but is an outright lie. If this is a level of “security” that meets your needs, at least use one of the many free versions posted throughout the internet (DETER.VLX from DotSoft is one I know of). There are solutions, but they always require changes in the workflow process that involve difficult tradeoffs and careful evaluation of what is technically feasible and practical versus the costs of implementing the changes. There is no such thing as installing a single piece of software to instantly solve the problem. If you are looking for ways to protect intellectual property in your drawing files, don’t be fooled by snake oil security vendors. Disclaimer: One of my hats is the president of CADLock, Inc. (http://www.cadlock.com/), makers of CADVault for AutoCAD.

December 6, 2008 · 2 min · Owen Wengerd

Propagandapedia

Did you ever wonder what press release writers do in their spare time? Given Autodesk's recent trademark litigation with SolidWorks (http://www.cadcourt.com/Docket/308cv04397AutodeskvSolidWorks.aspx) and related efforts (http://www.cadcourt.com/Docket/92047002AutodeskvODA.aspx) by Autodesk to trademark "DWG", and given the fact that US Patent and Trademark Office (USPTO) trademark examiners are known to use Wikipedia during their research (http://iplitigator.huschblackwell.com/2007/07/articles/trademark/trademark-trial-appeal-board-says-internet-is-here-to-stay/), it doesn't take an evil genius to realize that a little subversive editing here and there might be helpful to the corporate cause. So, I decided to use Wikiscanner (http://wikiscanner.virgil.gr/) to go spelunking through the labyrinth of Wikipedia editing history to see if I could unearth any nuggets. ...

October 15, 2008 · 2 min · Owen Wengerd

OpenDCL Quick Intro

If you’re an AutoLISP programmer, you’ve probably heard about OpenDCL. Maybe you’ve even checked it out, but it looked complicated and you weren’t sure whether it was worth the trouble to learn how to use it. Either way, do yourself a favor and spend 10 minutes to go through the following 10-step quick introduction to OpenDCL. Download and install OpenDCL Studio. Select the latest version in your desired language (ENU in the filename means US English). The download is an .msi file that can be cleanly uninstalled afterward.Start AutoCAD (2004 or later). Use the APPLOAD command to load _MasterDemo.lsp from the OpenDCL Studio samples folder (it will be located in a language subfolder of the main OpenDCL Studio folder). When you close the APPLOAD dialog, the OpenDCL ‘MasterDemo’ dockable form will appear.Click on the [ListView] button to run the ListView sample. The ListView sample is very simple and will demonstrate some basic principles of OpenDCL. Leave it running as you proceed through the following steps.Locate and open ListView.lsp in the OpenDCL Studio samples folder. ListView.lsp contains all the code for the ListView sample. Look for the c:ListViewDlg_Close_Clicked function defined near the end of that file. That function is called an “event handler”, and it is the lisp function that is executed when the [Close] button is pressed. The event handler for the [Close] button simply closes the dialog. The c:ListViewDlg_OnInitialize event handler function initializes the controls on the dialog before it is displayed.Locate and open ListView.odcl in the OpenDCL Studio samples folder. Files with an .odcl extension can be opened and edited in OpenDCL Studio. OpenDCL Studio is used to design the user interface elements in an OpenDCL project. In the project tree pane, open the ‘Modal Forms’ folder, then double click on ListViewDlg. The ListView form will be displayed in design mode.Click on the [Close] button on the ListView form. In the font toolbar at the top of the editor, press the [B] button to make the font bold. Notice that the button’s caption becomes bold. In the ‘Properties’ pane, double click on the ‘Height’ property value and change it to 20. Press [Enter] to apply the new value. Use your mouse to drag the bottom of the button in design view to resize it dynamically.Leaving OpenDCL Studio open, switch back to AutoCAD. Resize the ListView dialog, and notice how the controls it contains are also resized. Now switch back to OpenDCL Studio, make sure the [Close] button is selected, then click in the right column of the ‘(Wizard)’ property in the Properties pane (or right click on the button control and select ‘Properties’ in the control’s context menu). In the Control Properties Wizard, the Geometry tab shows that the button’s “Left Side Alignment” has been set to “Offset From Center of Dialog” and it’s “Top Side Alignment” has been set to “Offset From Bottom Edge”. Once these properties are set, no additional code is needed for the control to react correctly when the dialog is resized.Exit AutoCAD, then restart. Enter the OPENDCL command. This command demand-loads the OpenDCL Runtime using AutoCAD demand loading mechanism. The OpenDCL Runtime must be loaded before the OpenDCL functions will work. The OpenDCL Studio installation includes OpenDCL Runtime, so it already exists on your computer.If you are developing an application for use by others, you’ll need to download and distribute the OpenDCL Runtime along with your application. This is best done by incorporating the OpenDCL Runtime merge module for your language directly into your own application’s installation script. Alternatively, you can distribute the standalone OpenDCL Runtime .msi file for your language, or publish the URL where end users can download the latest version.Switch back to OpenDCL Studio and double click on the [Close] button control. Intelligent help displays all the properties, methods, and events of the selected control, including their AutoLISP syntax. Click on a property, method, or event in the left pane to see detailed information for it.Once you complete these ten steps, you are only a few minutes away from creating a fully functional OpenDCL application. Give it a try! ...

August 24, 2008 · 4 min · Owen Wengerd

Debugging ObjectARX: Break on Exception

I have presented a class entitled High Octane ObjectARX at Autodesk University the past two years. In 2006 the focus was on project organization, and last year I focused more on techniques for supporting multiple versions of AutoCAD with a single Visual Studio solution, touching briefly on testing and profiling. For 2008 I plan to focus on debugging. ...

May 12, 2008 · 2 min · Owen Wengerd

The Day the ObjectARX SDK Died

Like that day almost 50 years ago, could today be the day that ObjectARX has died? There have been a flurry of posts (http://discussion.autodesk.com/thread.jspa?threadID=652855) in the ObjectARX discussion group about problems downloading the new ObjectARX 2009 SDK. At first I dismissed the problems as new release hiccups, and expected things to get resolved in short order. Seeing that there were no new complaints this morning, I headed over to https://www.autodesk.com/objectarx to download the new ObjectARX 2009 SDK. Instead of the new ObjectARX 2009 SDK, I received the following: ...

March 27, 2008 · 3 min · Owen Wengerd

Periscope Speaks HTML

I hit the jackpot at Radio Shack, so I’m back early from my last minute Christmas shopping today. That means I have time to tell you about the new Periscope 4.0 just released this week, in case you’re looking for a last minute stocking stuffer for that CAD geek friend of yours that already has everything. Periscope shows information about the entity beneath your AutoCAD cursor in a tooltip window (“scope window”) as you hover over an entity in AutoCAD. Periscope 3 added a COM interface that made it very easy to program a custom “extender” that added to or modified the displayed entity information. Periscope 4.0 goes even farther – it uses an excellent open source class by Eugene Pustovoyt to render simple HTML in the scope window. Custom extenders for Periscope 4.0 can now use selected HTML tags to format and beautify their output. If you’re upgrading from a previous version of Periscope and you already use a custom extender, note that you will need to make a few minor modifications to your extender code. In addition to referencing the new type library (now version 4.0), you’ll need to add a new “GSMarker” argument to your extender’s AddScopeText event handler. I’ve added a new .NET sample extender to show how easy it is to write a Periscope extender in .NET via COM interop. AutoCAD Map 3D 2008 and Topobase 2008 users, check out the commented code in the .NET sample extender to see how you can display feature data in the scope window! Happy Holidays!

December 22, 2007 · 2 min · Owen Wengerd

Blog Posts Immortalized

I’ve created a compendium of two previous series of blog posts on my web site for posterity (and easier reading): I’ll take web sites for $200, Alex Digital Signatures in the CAD Industry

December 15, 2007 · 1 min · Owen Wengerd

Digital Signatures: Practical Guidelines

We use digital signatures every time we visit a secure web site. Visiting a secure web site involves an authentication process that includes verifying the identity of the server by ensuring that its digital certificate, or “server certificate”, is signed by a trusted certificate authority. This verification process might involve verifying an entire chain of certificates from the actual server certificate up through one or more intermediate certificate authorities and ending with a trusted root certificate authority. This all takes place quickly and automatically before the web page is displayed in your web browser because the web browser includes built in logic to do this work without any user interaction. More importantly, the web browser warns us when the server certificate is expired or invalid. The biggest obstacle when using digital certificates in a CAD environment today is not creating them, but easily and automatically verifying them at the receiving end. Even in a completely digital distribution system where everybody works from the CAD model, the various software tools we use to view and work with the model do not handle digital signature verification automatically in a standardized way. As long as downstream consumers of CAD data cannot easily and automatically ensure the trustworthiness of digital data, they will continue to rely on handwritten signatures on paper. A second obstacle to the use of digital signatures is the difficulty in accepting that digitally signed data is only trustworthy while it remains in digital format, and therefore the digital file is the “record” document. There is substantial social inertia that must be overcome before a digital document can gain the same amount of trust as a paper document. Engineers and architects must deal with the specter of previously hidden meta data in their CAD models becoming part of their signed document, thereby exposing them to new liabilities that don’t exist with paper drawings. Construction supervisors must learn to refer to the CAD model instead of relying on hardcopy blueprints when resolving disputes or establishing responsibility for errors. Here I think it should be noted that the use of a digitally signed model does not preclude the creation of hardcopy blueprints. Those can be created and “wet stamped” separately at the same time the CAD model is signed digitally; or they can be created in the field for reference without any signature at all. AutoCAD has supported digital signatures for several years, but using the built in functionality is limited to only individual DWG files, lacks support for co-signing (more than one person signing), and forces the signed document to remain in the proprietary DWG format or lose its signature. These problems can be worked around by using third party tools, but doing so requires recipients to use the same tools. Over the past few years, many government plan review bodies have amended laws and administrative rules to accommodate digital signatures as part of the plan review process. Without standardization, however, organizations still struggle to effect the necessary changes in their workflow. A lack of uniformity in terminology from one set of regulations to another adds to the confusion. If you are involved in amending or creating rules or regulations that enable the use of digital signatures, you should use generic and well defined terms of art in the regulations, but supplement these with practical guidelines that mention specific technologies, software tools, and file formats that will meet the legal requirements and that you are capable of working with. If you are an architect, engineer, or CAD manager working to implement digital signatures into your firm’s workflow, there are some concrete steps you can take to make the task easier. Start by segregating your distribution network into “digital-only” and “hardcopy” classes of downstream users. Begin the transition with the digital-only part of the network (perhaps only the plan reviewing authority, for example). Next, decide which file format to use for your digital “documents”. Rather than signing CAD files, many companies start by signing 2D output files such as PDF, DWFx, or XPS. These files are essentially digital versions of the hardcopy documents, so they are more familiar to a wider audience and avoid some of the liability issues of exposing formerly hidden metadata that lives within the CAD model files. You’ll need to obtain a digital ID and establish internal policies for storing and accessing the digital ID so that only the owner of the digital ID ever has access to the private key. Windows includes a built in certificate manager that you can use to view and manage your digital IDs. To start the certificate manager, run the certmgr.msc management console by entering its name in the Start -> Run command window. Your digital certificate will be installed in your personal certificates folder along with a link to the private key stored in the Windows secure key repository. Make a backup of the digital ID by exporting it to a password protected PFX file. Once a backup is made, the private key should be marked as not exportable to further secure it. If you want to create digitally signed AutoCAD DWG files, you can use the digital signature feature of AutoCAD to sign a drawing file either while saving it or after it is saved. You should also consider subscribing to a commercial time service (see What time is it?) to ensure that your signatures are accompanied by a reliable time stamp in case your digital ID becomes compromised at some point in the future. Third party tools like CADVault for AutoCAD even make it possible for different people to sign different parts of the CAD model, but such advanced functionality is not needed in most cases. If you use different CAD software that does not support digital signatures natively, or if you choose to sign only the secondary files produced by exporting your CAD model to a different format, then you will need to use either tools specific to that format or third party tools that work with files of any format. Adobe Acrobat (http://www.acrobat.com/) (PDF) and Microsoft’s free XPS Viewer (http://www.microsoft.com/whdc/xps/viewxps.mspx) both provide integrated digital signature tools that use the same digital IDs that you would use in AutoCAD, Internet Explorer, or Outlook/Windows Mail, and both applications are easy for recipients to obtain and use. Another popular tool for managing digital IDs and signing files is an open source tool called GnuPG. GnuPG utilizes encryption and key storage standards called OpenPGP (http://www.openpgp.org/about_openpgp/). OpenPGP is not compatible with the X.509 standard used by Windows and many other encryption tools, however it is an attractive alternative when cost or closed source tools are a prohibitive barrier. There are many other digital signature resources available on the internet for those wanting more information, or needing specialized tools. Unfortunately, no matter what software tools or file formats you use, today’s CAD software and document viewers still do not provide the user experience that web browsers do when it comes to digital signatures. These problems can be overcome by end users, but ultimately they need to be addressed by the makers of the software tools we use. Software for handling digital data will need better user interfaces that allow users to easily specify which digital signatures should be trusted for which purposes, and provide requisite warnings when a document should not be trusted. I am confident that these improvements will come in the future, especially as more companies begin to use digital signatures in their workflow and demand for better digital signature support rises. If you already use digital signatures with your CAD related documents, I would like to hear about it. Please leave a comment about your experiences, whether good or bad!

December 10, 2007 · 7 min · Owen Wengerd

Digital Signatures: Under the Hood

The basic requirements of a digital signature are that it must uniquely identify the signatory, it must be independently verifiable, and it must be invalidated if the signed data has changed. To understand how these objectives are achieved, let’s start with the foundation of modern digital signature technology: public key encryption and the public key infrastructure, or PKI. In public key encryption, a “key pair” consists of two parts: a public key and a private key. In simplistic terms, the public key is mathematically derived from the randomly generated private key using an algorithm known as a “one way function”. A one way function makes it easy to calculate a public key if the private key is known, but extremely difficult to deduce the private key if the public key is known. The end result is a secret private key and an openly shared public key that are mathematically related in such a way that the public key can be used to decrypt data that was encrypted with the private key, and the private key can be used to decrypt data that was encrypted with the public key. This interesting property of such a key pair gives rise to a number of useful capabilities. In the case of digital signatures, the act of signing data is essentially nothing more complicated than encrypting the data with a private key. If the data can be decrypted successfully with the signer’s public key, then only the signer’s private key could have been used to do the encrypting. In practice, this process is simplified so that the signer encrypts only a secure hash, or checksum, of the data to be signed. The recipient then calculates the hash from the raw data and compares the result with the “signed” hash after it is decrypted. If the values match, the digital signature and data are validated. For this process to work properly, there need to be standard ways to package information about the algorithms used, and to provide important information about the keys themselves. This need is fulfilled by digital certificates. A digital certificate is a file or block of memory containing a public key along with ancillary data about the key and its owner. The certificate is itself digitally signed by the entity, usually a mutually trusted third party, that issued the certificate. This enables users to verify that the public key is valid and trustworthy. A digital ID is the private key component of a key pair. Normally the private key is not stored together with the public key, but instead is stored in a separate physical location for security, usually requiring a password to access it. A key manager maintains links between the digital certificate and its associated private key. In many cases, it is convenient to use the term “digital ID” to mean both the public and private keys, even though they are physically separated. It is almost always a good idea to time stamp digital signatures. Time stamping involves sending the digital signature to a time stamp authority, who then creates and returns a digitally signed time stamp that is uniquely and securely associated with the original digital signature. The time stamp can then be verified by third parties in the future by using exactly the same technique used to verify a digital signature. I think these important terms deserve a review. A “digital certificate” is a public key, which is itself digitally signed by a mutually trusted third party. Your digital certificate represents your public digital identity, and it should be made freely available to anyone who wants or needs it. A “digital ID” is a digital certificate and the private key associated with the digital certificate. It isn’t difficult to create your own self-signed digital ID, but a digital ID is only as good as the issuing authority that signs it. When you purchase a digital ID from a third party like VeriSign or Thawte, their reputation makes your digital ID more trustworthy.

December 10, 2007 · 4 min · Owen Wengerd