Revit 2019.2 Update Released

Revit 2019.2 Update was released today. Of particular interest in 2019.2 is the addition of Revit Cloud Models which allows users to host Revit models in the BIM360 platform even if not collaborating. Kind of a BIM360 Design/C4R “LITE” so to speak. That description of Revit Cloud Models is likely a little misleading so I recommend a more robust (but still not entirely clear) explanation on the Revit Blog.

You can download the update from your Autodesk Accounts Portal…

Or you can download and install from the Autodesk Desktop App…

You can see a list of issues fixed and new features from this link.

ITM Dimension/Option Locking Hack

When you build content, it’s often desirable to have certain dimensions or options locked. This even applies to connectors, seams and dampers but to a lesser degree.

If you have a lot of Dimensions and/or Options to Lock or Unlock, you don’t have to individually pick each one. You can lock or unlock many very quickly provided they’re in a row.

The trick is simple….pick the button to lock/unlock the first field you want to change, and then while still holding the pick button drag your mouse up or down. This is a fast an efficient way to lock large groups of properties without picking each one.

The following recording shows this process. We’re using Pattern Number (CID) 910 as our example.

What Does COST TYPE do on ITM Content?

When you build Autodesk Fabrication content, you may have noticed one of the properties “Cost Type“. You can see this setting is shown in the following image. 

If you do some searching online, you may run across an explanation for some but not all. As Autodesk explains in it’s online help….

  • Normal – Reads the MaterialFabrication, and Installation tables to generate costs of all materials, fabrication labor and installation labor.
  • Supply Only – Reads the Material and Fabrication tables to generate the same costs of material and fabrication but NOT installation. (You’d typically use this if you are fabricating for others outside your company.)
  • Free Issue – Reads only the Install table when calculating costs.

This leaves two remaining values that can be set. These are not documented by Autodesk. These two serve the same purpose…

  • Demolition – Used as a filter for Labor table value sets
  • Relocation – Used as a filter for Labor table value sets

Using these values would allow you to build a labor table for relocation that would include uninstall and reinstall time. You could also use the demolition value to build a labor table for removal only of an item. 

While you would think these only would apply to an install table, these filter values are also available for the fabrication table. At the very least, this opens up the possibility of using it in creative ways to serve whatever purpose you like.

Defensive Driving for Coders

Disclaimer: I’m not a professional coder. Just a good hack, script kiddie, amateur, whatever you want to call me. But I’ve been doing it for a while and I tend to be good at finding ways to make things less error prone. I also pickup tricks from industry peers who humble me with their ability.

If you aren’t a professional programmer, you’ve likely never been told either. So I’m telling you as its helped me and I’m sure it’ll help you too if you’re an amateur like me. 

This works regardless of language. Whether you code in Visual Basic, AutoLISP, Java, C# or any other language the concepts are the same but the syntax will be different. For this reason, I’ll use pseudo code…that is, syntax that isn’t any particular language but uses terms obvious to describe what’s going on.

The Issue with Strings (Text)

A common activity in any programming is reading text, often called String data types. You read the value from somewhere else like a property or have the user type the data. You then need to test the data in a conditional statement to see if the data is valid. You may also be testing to see which action to take depending on what was typed. 

The problem when doing this is you don’t always know the case used when typing. Most conditional testing on string data is CaSe SeNsItIvE. Take the following examples….

MyValue = "Elephant"
if MyValue = "Elephant" then
MessageBox "Yes - There's an Elephant in the room"
end if

This code works because the case of the text strings is identical. But what about this….


MyValue = "elephant"
if MyValue = "Elephant" then
MessageBox "Yes - There's an Elephant in the room"
end if

In the above code, the test fails because the “E” in “Elephant” is now lower case.  This is very simple to solve and is obvious once it’s pointed out.

To resolve this, when you test a String value, use code to force the value to either UPPER (or lower) case and test against that. Now look at the following code…

MyValue = "Elephant"
if
Upper(MyValue) = "ELEPHANT" then
MessageBox "Yes - There's an Elephant in the room"
end if

  …or this example…. 

MyValue = "Elephant"
if
Lower(MyValue) = "elephant" then
MessageBox "Yes - There's an Elephant in the room"
end if

In either of these examples, we take the value we want to test, force it’s case one way or the other and test against that case. Now it doesn’t matter what case is typed by a user or returned when reading a value, the test is now essentially inoculated from case differences by forcing it one direction or the other. 

A Less Obvious (but related) Tip

Another common mistake I see people do is not use this technique when they know the software better. For example, lets say you wanted to retrieve the type of AutoCAD object and noticed that AutoCAD ALWAYS returns the name in mixed case….”Line”. 

It’s common for less experienced programmers but very smart and observant coders to ignore the tip I just suggested. I’d advise you to NOT do that…always use a forced case when testing text strings. Even when you’re sure the value you are reading and testing is always a particular way.

Why? What happens if…that pesky if…AutoCAD or whatever you are using changes? Autodesk sees a lot of programmers…maybe they overhaul AutoCAD code and object types are now returned upper or lower or a mix? You’ve now put in the hands of someone else if your program will break in the future. As unlikely as it seems, it’ll eventually happen. The key to writing resilient code is tricks like this. Think of it as a coder’s version of “Defensive Driving”. Anticipating future inconsistencies and planning for them makes your code more resilient and less likely to break on your next upgrade. 

Fabrication CADmep Help

It’s sometimes easy to miss new things. This is why I want to point out something that was added in 2015. CADmep now has an APPHELP command. You can type APPHELP at the command prompt to bring up CADmep’s help system.

If you’re online, the help is pulled from Autodesk’s web site from the following URLs…

When you’re not online, APPHELP  loads the help system that’s installed locally. You can find it in these folders…

  • C:\Program Files\Autodesk\Fabrication 2015\Help\index.html
  • C:\Program Files\Autodesk\Fabrication 2016\Help\index.html
  • C:\Program Files\Autodesk\Fabrication 2017\Help\index.html
  • C:\Program Files\Autodesk\Fabrication 2018\Help\index.html
  • C:\Program Files\Autodesk\Fabrication 2019\Help\index.html

But what if you’re using CAMduct or ESTmep? No worries. The other products work the same way. Instead of typing APPHELP, type F1 on your keyboard or use the Help pull down menu.

BIM360 Integrations

If you’ve ever wonder who’s integrating with Autodesk’s BIM360 Platform there’s a list online. This is more important than ever with the number of solutions out in the market. When you select one, you’ll want to know if you’re creating another digital silo. Autodesk integration list is a good way to see if your net solution can be leveraged with your existing BIM360 accounts. 

https://integrations.bim360.autodesk.com/ 

View CAD Files Without Software

Did you know that Autodesk hosts a free Online Viewer that supports most of the Autodesk file formats? Simply browse to https://viewer.autodesk.com/ and sign in with your Autodesk ID (free to register)

While not all functionality is available that you’d expect from their native applications, the online viewer does boast support for an impressive 50+ files formats. For a full list of file formats supported, check out this Knowledge Base article…https://tinyurl.com/AutodeskOnlineViewer

Step 1:

Browse to the viewer URL….https://viewer.autodesk.com/ 

Step 2:

Log in using an Autodesk ID (free to register)

Step 3:

Wait for you file to be uploaded and processed. Or close the page after uploading and wait for the Email with a link to the model when it’s finished processing on Autodesk’s servers. Here’s a link to one of the Autodesk Revit samples models I uploaded… https://tinyurl.com/AutodeskOnlineViewerTestModel

Step 4:

View you model and/or send a link to others.

Autodesk Selling Previously Abandoned Product

While applicable to my career over a decade ago, I normally wouldn’t cover news on ArtCAM. It’s not relevant in my current professional life. However I find this interesting and noteworthy which is why it caught my eye. 

ArtCAM History 101

In 2014, Autodesk acquired a CAM software developer named Delcam. (https://en.wikipedia.org/wiki/Delcam)  Delcam was based in the United Kingdom and wasn’t as widely known as some of the big players like MasterCAM, Gibbs, Esprit or any number of others. Delcam was different. Instead of a few well selling products, they had a vast portfolio of CAM smaller solutions for niche markets like jewelry and footwear. 

Autodesk on the other hand is a large volume software company. They don’t do “niche” very well. The smart play was to leave Delcam alone. This lasted for a few years but that recently ended.  

One of their more popular products was ArtCAM. I supported it at one of my past employers over a decade ago. Earlier this year, Autodesk announced they were discontinuing ArtCAM to the dismay of it’s users. This was no surprise as Autodesk has a long history of acquiring software and companies and realigning or discontinuing products. You can see a list of most of them on Steve Johnson’s blog here…https://www.cadnauseam.com/autodesk-graveyard/

Departing from Historical Actions

What I do find noteworthy, and I’m just getting around to write about it now despite being month old news, is that they made the decision to sell it off. ArtCAM will continue but from a new company. This typically doesn’t happen. You either take the hit and migrate to what Autodesk wants or you find another product. This time, the product will continue but with a new company and name…Carveco. http://carveco.com/

Why do I find this interesting? It’s no surprise that Autodesk has pretty much abandoned new development of Fabrication CADmep, ESTmep and CAMduct. All their efforts are focused on Revit’s Fabrication parts. While that eliminates the need for CADmep for many, there’s still no clear public strategy on ESTmep or CAMduct. It would be nice if they took those products and found a way to spin them off. Granted, it’s harder in this case. They share a common data platform (the Fabrication Configuration) and content with Revit now. None the less, I’m sure there’s a lot of smaller firms that could make a good run of it. They’d just have to partner with Autodesk a little differently than in typical. 

What do you say Autodesk CEO Andrew Anagnost? You’re company helped fracture the MEP industry with your purchase of MAP software in 2012. Only now do we see several 3rd parties emerging and targeting the MEP contractor. How about giving one or two of them a shot…to continue with the value we see in these products?  

AutoCAD ActiveX Programming in VBA or AutoLISP

ActiveX is a framework developed by Microsoft in 1996 which adapts earlier concepts of COM (Component Object Model) and OLE (Object Linking and Embedding). Most people may think of this as Visual Basic (pre .Net era) programming.

This was supposed to fade away as Microsoft moved to the .Net based languages so Autodesk pulled support in the shipping versions of AutoCAD years ago. It was however still available as a separate download for a limited time but that time never arrived. Microsoft kept it around and still today, Autodesk supports VBA, a version of Visual Basic embedded within the Application over half a decade later.

If you’e not interested in programming AutoCAD in VB or VBA but do use AutoLISP, I’d encourage you to keep reading, this article is still for you.


Enabling VBA in AutoCAD

 If you want to take a stab at VBA programming in AutoCAD, you’ll need to install the Visual Basic Extension. The extension can be downloaded for 2016 – 2019 versions of AutoCAD from this link….https://tinyurl.com/AcadVBAInstaller

Download the VBA Enabler for AutoCAD from Autodesk’s web site.

VBA Help for the AutoLISP Programmer

Now, with AutoCAD’s help now Online, you might be tempted to think that it’s the most robust help you can get from Autodesk. Simply typing “F1” will bring up AutoCAD’s help and browsing through the developer documentation, you can find documentation of AutoCAD’s ActiveX Object Model like seen in the following image.

AutoCAD’s ActiveX Object Model is buried in the AutoLISP documentation Online.

Looking at the above image, the graphic of the Object Model contains no hyperlinks. And there’s no documentation on the Methods, Properties and Events typically available for this type of programming. 

If you’re programming in VBA, the VBA Editor has tools for helping navigate this model or provides a lot of Auto Complete functionality when typing code.  This doesn’t help anyone trying to program ActiveX from AutoLISP.

This is where the Offline Help comes in. You can access the OffLine Help download page from within AutoCAD by clicking the down arrow next to the question mark in the upper right corner of AutoCAD and then selecting Download Offline Help to download and install the help system.

Got to the Offline Help Download page from this menu.

You can also click the following link….https://tinyurl.com/Acad2019-OfflineHelp to go to the AutoCAD 2019 Offline Help download page as shown in the following image.

Download and Install Offline Help from this page.

Configuring Offline Help

Once installed, you can configure AutoCAD to use the Offline version of Help by typing Options at the command line and clearing the toggle in the following image.

Clear this Toggle to Default AutoCAD to Offline Help

Once configured, typing “F1” will access the Offline help. One of several added pieces of Documentation which includes the ActiveX Developer’s Guide, is the ActiveX Reference Guide. You can see the graphic of the same Object Model documentation as before, but this one is hyperlinked to documentation of the Objects as well as lists all of the Methods, Properties and Events. 

The ActiveX Reference Guide contain all the documentation you need for ActiveX programming.

While all of documentation is written with the Visual Basic programmer in mind, the organization of the ActiveX object model and everything else is where you can get all the documentation you need to help translate the function calls to their AutoLISP syntax. When you make a call to (vl-load-com) in AutoLISP, you have access to over 2000 additional AutoLISP functions with a VLR- prefix. These functions are all documented here in the ActiveX Reference Guide in Visual Basic syntax.

In a future post, I’ll explain how to translate the Visual Basic documentation to AutoLISP syntax. If you don’t want to wait, review the ActiveX documentation found in the AutoLISP developer guides…it’s all in there!  

One Final Note: You do NOT  need to install the VBA Extensions in order to program w/ActiveX from AutoLISP. Just install with Offline Help and you’ll have everything you need.