Between the alpha version (which I used to write most of the content on this blog, during the embargo period) and the beta version, a couple very useful features were quietly included into the API...
Show Me The Elements!
If you had ever written an application with the Revit API that identified particular elements, you probably ran across this... There wasn't any nice way to show the user WHERE a particular element was... The best that you could do was to exit your application, telling Revit that it had "failed" and having the element in question as part of the selection set. This gave a somewhat ugly Revit dialog box where the "error elements" could be examined.
But the other day, I stumbled on this late addition... the new ShowElements() method will let you specify one or more elements - and will temporarily jump to a view which nicely frames them. It's a beautiful thing! (of course, if I was a complaining type, I might whine that there's still no way to nicely highlight the element at the same time - but I'm not a complainer! :) ).
Worksets...
While we haven't done an application in Revit yet that needed to be aware of whether it was part of a workset, I'm sure that day is coming... Also making a late appearance were document properties that tell you whether it is WorkShared, and the location of the central file... I'm sure it will come in handy...
All in all, a nice set of suprise additions between alpha and beta....
Wednesday, April 11, 2007
Revit API 2008: A few more features sneaking in...
Posted by
Matt Mason
at
9:27 AM
0
comments
Labels: Revit
Friday, March 23, 2007
Revit 2008 API: New Creation Capabilities, Newly promoted Objects
In any new release of an API like Revit, it seems like everyone's first question is "what can it create now? can it create everything that I want/need? can it create everything that is in the interactive Revit product?". I however, am too mature to care too dearly about that :)
New Application Object Creation
In the application area, the following can now be created. Most of these are "mathematical" objects which are later used to create actual geometry.
- Ellipse
- NurbSpline
- Select Element Set
- Parameter List Item Array (apparently used in conjunction with some kind of external parameter item list).
New Document Object Creation
In the document element creation, the following objects can now be created:
- Annotation Symbol
- Area Reinforcement
- Beam System
- Detail Curve
- Foundation Slab
- Opening
- Path Reinforcement
- Room
- Tag
- Text Note
- View Plan
Elements Promoted to Concrete Objects
If you've ever scanned a Revit model programmatically, you know that there are probably 30,000 elements in a very modestly sized model. If you look at their types, you know that a large number of those elements show up as "Autodesk.Revit.Element" - meaning that they are an abstract type with only limited information provided about them.
In 2008, a variety of Element types got promoted so that they are represented by full classes. This typically means that you can inquire about more detailed information on these types:
- Blend
- Extrusion
- Sweep
- Revolution
- gbxmlElement
- LinearArray
- RadialArray
- ProjectInfo
- ProjectUnit
- Sketch
- SpotDimension
- TextNote
- ViewPlan
- ViewSection
- ViewSheet
- Leader, LeaderArray
(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).
Posted by
Matt Mason
at
2:22 AM
10
comments
Labels: Revit
Revit 2008 API: The Hidden Features
This is probably my favorite topic... the enhancements to the Revit 2008 API which are not obvious - that we've figured out by inspecting behavior rather than inspecting documentation. For those of us trying to accomplish some goal with the API, and improvement in this category is worth just as much as any other feature enhancement...
Rooms and Family Instances
I think a variety of us had tried to do programmatically what Revit did so nicely - keep track of what room a particular family instance was related to. The API and the scheduling guide seemed to have everything we needed: parameters for Room, ToRoom and FromRoom... BUT - they sort of, well, didn't work.
I'm happy to say that as of Revit 2008, everything that I've tried relating to Family Instances and Rooms DOES work:
- Family Instances now have a "first class" "ToRoom" and "FromRoom" property (not just buried in the parameter list). So you can now understand the connection between rooms based on the information in Doors and Windows - NICE!
- Family Instances now have a Room Parameter that works - ie furniture knows what room it resides in (can you say "Asset Management application?").
A couple of additional notes:
- Room objects seem to have many more Parameters than before - I'd estimate 75 parameters on every room, most of them Revit Systems oriented.
- Door Oddity: External Doors have a FROM but no TO room.
- Window Oddity: External Windows have a TO but no FROM room.
- The FamilyInstance/Room relationship is PHASE-AWARE... So if a phase means that the instance is now in another room in a later phase, it can handle that. Wow!
Other FamilyInstance Enhancements
Beyond the myriad of Room-oriented enhancements, there are a number of interactively-oriented enhancements to FamilyInstances, including:
- Properties for CanFlipFacing, FacingFlipped, and a method to actually do the Flip
- Properties for CanFlipHand, HandFlipped, and a method to do the Flip
- Properties and Methods for mirroring and rotating
- A property for "SimilarObjectTypes" - making it far easier to figure out the types that this instance could swap to.
- This is a little out of place, but if you get from the FamilyInstance to the Family, you now have access to deeper Family information such as Solid and Void feature information (I haven't figured out what to do with it yet).
TextNote
While it's a very nice thing that TextNotes can be created in Revit 2008, an API always should be measured on both its ability to create data as well as its ability to read existing data. While the TEXT_TEXT builtin Parameter had been in existence since the beginning - it never worked until now... With the Revit 2008, you can get the text associated with a given note using the TEXT_TEXT parameter, as well as the coordinates of each note through a property. All in all, TextNotes have become very functional!
OK, the next two topics don't really go to the level of hidden in behavior - but they are not well publicized by the "what's new"...
View
Some small but, I think, incredibly important changes were made to the View object (at least if you've tried to work with it before).
- CategoryVisibility - the ability to control category visibility within your view
- Print - print a given view
- Type - the type of view
- GenLevel - very important: the level which generated this view (I think that this is incredibly important for queries... it lets you easily figure out which elements are logically associated to the current view, for example).
The geometry objects have been upgraded with a variety of enhanced properties and methods to help with mathematical analysis:
- Curves: Properties like ApproximateLength, isCyclic, Period, etc.
- Curves: Methods like ComputeDerivatives, Distance, Evaluate, Intersect, IsInside, Project
- Faces: Properties like isCyclic, Period
- Faces: Methods like ComputeDerivatives, Evaluate, Intersect, Project, IsInside
These enhancements are critical when you have a geometry-intense application (and you'd rather not re-invent the geometry wheel in your own code).
Summary
I'm sure that this list is far from complete - it's just what we came up with based on some exploration (and in particular reviewing some of our pains from the past). Understanding undocumented behaviors is an important step to mastering the possibilities of the Revit API - and a challenging topic learn. It would be nice if we could come up with a way to share our experiences - perhaps a Wiki or other collaborative solution.
(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).
Posted by
Matt Mason
at
1:42 AM
10
comments
Labels: Revit
Wednesday, March 21, 2007
Revit 2008 API: Working at the Application Level
(stretch) We are finally out of the box!
Prior to Revit 2008, Revit developers were kept in a fairly narrow box... You could only be added to the Tools + External Tools menu, and you could only be run when Revit was in "Modify mode" in the context of a document. The straightjacket was on!
As of Revit 2008, that's now gone... and while you don't have complete carte blanche to work in the application level, there are a variety of critical steps:
ExternalApplication
There is now the concept of External Applications, which are started when Revit starts (and shutdown when Revit shuts down). There are also now application level events for keeping tracking of when documents are created, opened, saved (which are important for a wide variety of applications which try to synchronize BIM data).
User Interface
External Applications can add both menus and toolbars. Menus can be added to the top level, or wherever you would like within Revit.
Document Control
From the application, you're now able to do several key things which were previously impossible:
- Open a specific Revit file
- Start a New Project from a Template (can you say "configurator"!?)
- Start a New Family Document
- Start a New Template
Also at the application level, event trapping is available for things like "OnNewDocument" "OnSaveDocument", "OnCloseDocument"...
(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).
Posted by
Matt Mason
at
1:32 AM
8
comments
Labels: Revit
Revit 2008 API: Import/Export of DWG/DWF/Image
One of the things that always seemed like a missing capability of any "end-to-end" kind of automation of Revit was that there was no good way to save your work - or better, save it back to DWG so that the AutoCAD crowd could see your work. I know that we worked with a variety of companies to explore how to do "batch save as DWG" on a nightly basis!
Well - I'm quite happy to say that Autodesk has added Import/Export of both DWG and DWF, as well as import of Image files. I suspect that the Image file import is to help tie Revit to various survey or aerial photo applications (whether it's Google Earth or otherwise).
All of the Import/Export tools come with a wide variety of options setting as well - so you get the sense that the processes have been well thought out.
(The wheels are churning in my mind of all the fun things that are now possible).
(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).
Posted by
Matt Mason
at
1:24 AM
0
comments
Labels: Revit
Tuesday, March 20, 2007
Revit 2008 API: Pick/Select
Oh, how long were we made to suffer? well, perhaps just the 2 years that the API existed - but it was painful! It was impossible to do what seemed most trivial in any other API... to be able to interactively pick something! Nope, not in Revit - if you wanted something picked, you better have had it picked in advance!
But no more! Finally we have two methods which bring a little bit of interactivity to your Revit application:
- Pick (single element)
- WindowSelect()
These methods will give control back to the user to do what they need to do, and add any selected elements to the "SelectedElementsSet". It's limited in that you can't pick a location on the screen - only an element - so while there is still more growth needed here, this represents a good first step.
I think it will also lead to more interactive Revit applications (rather than simple tools) - prior to now you could only work with the pre-selected element set. While this didn't completely preclude multiple pick application scenarios, it certainly made them more awkward.
(In this series of postings, I'll continue to provide short commentary on what's new in the Revit 2008 API, and why I think it's interesting).
Posted by
Matt Mason
at
1:19 AM
2
comments
Labels: Revit
Revit 2008 API: What's New
OK, the cuffs are finally off... we're allowed to talk about the Revit 2008 API...
There's so much that's new, I'm going to tackle it in a few different postings, just to spread things out a little bit.
Until now, most developers would have characterized the Revit API as "immature" - but Autodesk has taken a variety of important steps to change my view of the API in this release. The door has been opened for Revit to perform a wide variety of new, more interesting tasks.
Some of the enhancements to the Revit API that I'll cover include:
- Interactive Element Pick/Select
- DWG/DWF/Image Import/Export
- Working at the Application Level
- Printing and Saving
- New Element Creation
- Elements Promoted to concrete classes
- More access to parameter and other data within elements
Anyone who has developed Revit applications or has been thinking about it should be excited at all of the new capabilities to work with in Revit 2008...
Posted by
Matt Mason
at
1:08 AM
2
comments
Labels: Revit
Vault 2008 and WSE 3.0
I wrote this post some time ago - when I wasn't sure where the embargo on Vault stood... Now I think I'm in the clear, since at least Productstream has been officially released.
Warning: This is a pretty obscure post - so if you're not involved in Vault development, you might want to pass on this one!
The next version of Vault (2008) is catching up to the latest in Web Standards from Microsoft - Web Services Enhancements 3.0. This will be nice, because WSE 3.0 is the only version that plays nicely with Visual Studio 2005 (leaving developers to jump through some hoops to make things work).
Along the way, I found out about a few issues that make Vault development a little more challenging...
1. Ticket changes
The behavior of the SecurityHeader ticket has been improved... Prior to now it tended to be the same for a long time (I'm not sure if I have it figured out, but you could restart the webserver, and your ticket would still be valid). Now, if you try restarting the webserver, your client's ticket is no longer valid, and you get a SoapException #300.
Working around this scenario means implementing either partial classes or derived classes to be able to store the userID and password, then do a "try/catch" around the actual invoking of the Web Services method... If you get a 300, then you need to try to re-login and then re-Invoke...
2. Download file changes
The signature for the file download has changed - instead of using DIME attachments, the routine just passes back a byte array... However, it's important to note that there is a client config setting called "MTOM" which should be turned on in order to have efficient transfers (if you don't, files will transfer in base-64 ascii mode rather than as binary - making them perhaps 30% less efficient).
3. Time is of the essence
Maybe it was the DST debacle - or maybe either WSE 3.0 or Vault 2008 is more sensitive about time differences between client and server. I know that while doing some wide-area testing, my machine clock was out-of-sync with the Vault 2008 server by about 10-15 minutes - and it would not let me work (buried down deep in the exception was a very clear message about the time tolerance setting). In particular I think it doesn't like it if the SecurityHeader looks like it was generated in the future.
Well - I hope that this was useful to Vault developers out there...
Posted by
Matt Mason
at
12:50 AM
0
comments
Labels: Vault
Friday, February 02, 2007
Autodesk Design Review now free - features and pondering...
Another nice gift from Autodesk... Autodesk Design Review is now free.
This will be a nice enhancement to people who already were using DWF for viewing, but didn't want to fork out the $199 for the ability to measure and redline the DWF files.
An interesting feature
A feature of Autodesk Design Review that I noticed for the first time recently is that it can open a few file types that I hadn't concentrated on before. If you go to "File + Open" and look at the types supported, it includes not just DWF but also image formats such as TIF/GIF/PNG/JPG as well as some older engineering formats CALS and IG4 (which I think is IGES).
While you've probably got your share of ways to view the image files, it's nice when you can have a single application that can view all those file formats (plus DWF) in a single environment. What's more, Design Review can batch print them to scale... You could even markup a TIF file, I bet. Not bad. (We used to have a multi-format viewer called IntraVision way back in the day - I think it's now owned by Spatial Components - but it's nice that they're giving them away these days).
We'll probably look at adding this behavior to our Product Browser application (which views files inside of Autodesk Productstream) - using ADR as a consolidated viewing application.
Point to Ponder
Does this represent another tactic in the battle between DWF and PDF? With PDF's recent opening of the format to the ISO committee - is this Autodesk's move? to make the review/markup/create tool free? It makes some sense to me.
Posted by
Matt Mason
at
5:10 PM
1 comments
Labels: DWF
Friday, January 12, 2007
DWF/XPS Clarification and Obfuscation
With all the posting about DWF support in Microsoft Windows Vista - I feel like I have to jump in and attempt clarification (because so many blogs and news reports STILL have it wrong, I think).
Here's my take on it.
- Microsoft developed the XPS specification as a PDF-killer... a digital paper spec
- Microsoft is providing an XPS viewer built-into Vista, and will provide it as a download in Windows XP, as part of .NET 3.0 runtime, etc
- Autodesk, through their partnership with Microsoft, has re-engineered the DWF format specification somewhat in order to make it compatible with the XPS spec - ultimately, DWF implementing XPS. This format is known either as "DWF 7.0" (its version) or as "DWFX" (its new file extension).
- I presume (I have no knowledge of this) that the next version of Autodesk products will support the creation of this new format.
- Autodesk is also updating the free DWF toolkit to allow other applications which read/write DWF to take advantage of this.
There - was that so hard? (Scott S, please jump in here if I've STILL gotten something wrong here).
Yes, it is somewhat of a big deal. No, it will probably not be a really big deal for another year or two when the number of people who have deployed Autodesk 2008 products and either Vista or the XPS viewer is substantial - the traditional network effect wherein the value is based on the number of people who can EASILY interact.
Posted by
Matt Mason
at
5:30 PM
2
comments
Thursday, January 04, 2007
Product Browser announced (finally)
Avatech's Product Browser application finally hit the press-release stage... It's been a long time coming - I feel like it's been a long hard-labor childbirth - a description that all mothers would (rightly) scoff at.
I think I've written about Product Browser before - it's a tool to help companies who are implementing the Autodesk Productstream data management tool provide a simple solution for navigating, searching, viewing and printing 3D models and drawings with "the Vault". It's particularly designed for the "downstream" people in a manufacturing organization - who are not CAD users. These are people that may not, in many cases know specific part numbers to lookup - so the application helps them graphically find what they're looking for.
If you're interested, you can see the press release here.
Our product web page is here, and we hope to have an eDemo posted in the near future.
Posted by
Matt Mason
at
8:38 AM
2
comments
Wednesday, December 13, 2006
Sort of Off Topic: Movie Studio Software
Since I can't say anything about what I've learned about the next versions of Revit, AutoCAD, Vault, Productstream and Inventor - I'll do an off topic post.
I thought I'd blog about something else I'm working on - my family's personal Christmas-card-on-DVD... I've been using Sony's Vegas Movie Studio software to put together a year's worth of still pictures and a few video segments - and then put it all to music. It's a laborious task - this year's version will probably run 20 minutes, and I'll have 20 hours into creating it...
The Payoff
I start by slogging through the layout, order, theming and titles (which is 95% of the work). But then comes the music - and suddenly, what had seemed like a dull slideshow that even our parents would not want to watch - is transformed into something really, really cool. I sit back and watch the video, spellbound. I AM STEVEN SPIELBERG! (OK, perhaps more accurately I'm Cameron Crowe, leveraging the music unapologetically to tell the story and connect with the audience).
The Take-away
In any case - it leaves me wondering - why can't CAD software be like this more often? Where's the payoff that makes me feel like I've created something timeless and incredibly cool? Yes, in my previous post I joked that "I am Frank Gehry" - but that was comparatively minor (for a comparatively minor effort, as well)... I suspect that reducing the hurdles involved with visualization and animation might go some of the way towards reproducing "that feeling". But somehow I suspect that until we can hook our CAD software to music, we won't get the emotional leverage that I get from making a movie. It's an interesting thought...
Posted by
Matt Mason
at
12:27 PM
0
comments
Friday, December 01, 2006
Extreme Architecture with Inventor and Revit: You too can be Frank Gehry
The key is the use of the ACIS SAT file as an intermediate format - as well as Revit's ability to take all kinds of massing elements and build walls and curtain systems on any face. While Revit is capable of modeling these kinds of things natively - it's certainly far, far harder than what you can do with Inventor.
See my example below:


Content Creation
Lisa also showed how to create Revit Family Content in Inventor... The trick is again to create a 3D SAT file of a part or assembly. In the case of an assembly, the SAT file made a trip thru AutoCAD - because Inventor has a strange layering convention, you need to change it to a set of DWG solids in order to place the solids onto layers. The layers, in turn, are used inside of Revit to assign different materials in the family.
Posted by
Matt Mason
at
1:27 PM
0
comments
What's Hot a Autodesk University? DWF...
This has been true for some years at AU - but this year it was definitely pervasive. Everywhere you looked people were touting DWF, and doing more and more with it. The (unofficial?) theme of the conference seemed to be "Experience it before you build it" - and DWF was a big part of that.
Windows Vista and DWF
One of the classic objections to pervasive use of DWF has been that "my customers know and have Acrobat Reader - they don't have this DWF thing, and they won't download it". Autodesk has pulled off quite a coup - while they didn't get the DWF Viewer included into Vista, they came close... They made DWF compatible with Microsoft's XPS (PDF competitor) spec... So Vista will be able to view 2D DWFs NATIVELY... Of course, it won't support 3D - but it will CERTAINLY help the adoption of DWF in the marketplace over the longer term (it's too bad that Vista adoption will be so slow).
Editor's Clarification: From Scott Sheppard, DWF Evangelist... It will just be the new DWF 7.0 standard files which is viewable via Microsoft XPS Viewer. XPS Viewer will also be backported to Windows XP as well. Also look for a new file extension: DWFx for future versions.
DWF Freewheel
One of the most interesting technologies I've seen lately has been Project Freewheel from Autodesk - a technology that uses AJAX (asynchronous Java and XML, and DHTML, etc) - to view DWF files on a web page with no viewer installed.
How does it work? Using only Javascript and web services, it requests that one of Autodesk's web servers render the view of your DWF file. Every time you pan and zoom, it does a quick round-trip to Autodesk to render it.
What's the downside? Well - I'm not sure if customers will have a hard time with the fact that the DWFs must be uploaded to Autodesk or otherwise publicly visible on the web in order to make use of the technology. I know that certainly manufacturing companies have been skeptical of such approaches in the past (raising the question, "how long before we see the Enterprise Freewheel project?").
http://dwfit.com
DWF FREEWHEEL 3D: BLOWN AWAY
The Freewheel sample has been been posted for a few months now - but only in 2D of course. Of course there was the inevitable question - what about 3D? And the word was that they were looking into it... But I was skeptical - that would mean some kind of capability of simulating 3D rotation in DHTML - and then re-rendering the 3D View dynamically... But they've done it!
That is quite the technical accomplishment...
Check out:
http://dwf.blogs.com/beyond_the_paper/2006/12/project_freewhe.html
If I had to guess, I think that they might be pre-rendering a bunch of low-resolution shots of different angles... Still impressive.
Posted by
Matt Mason
at
1:20 PM
2
comments
Labels: DWF
What's New in AutoCAD 2008? Reducing Customer Embarrassment.
OK - that was just a tease - Due to a Non-Disclosure Agreement, I can't reveal the specifics of what I learned at the Autodesk Developer Network conference this week... At least until February or so.
But as I was thinking about how I might vaguely characterize it - I was reminded of one of the worst parts of being a Product Manager - Customer Embarrassment. This happens when you sit and watch how your customers actually use your tools, day-in-and-day out. You quickly realize that for all the wonderful, whiz-bang features you've added, some very simple tasks are still incredibly difficult to do - or that customers work out elaborate unnatural acts to get what they need out of your software. As a Product Manager, it's painful and embarrassing to watch.
The good news is that, as a Product Manager, you have the power to fix things in the next release!
So that's all I can say for now... I'm not sure how many new features will have the WOW factor like we saw in AutoCAD 2007... But there are MANY features that will draw a collective sigh of happiness from the users in the trenches, when they realize that their day-to-day work will become much easier.
Posted by
Matt Mason
at
1:14 PM
0
comments
Labels: AutoCAD
Thursday, November 16, 2006
ADN Dev Days are coming...
For those of you in the Autodesk software development world, the season of joy (and occasional pain) is coming.
ADN Developer Days (and of course the larger, Autodesk University conference) provides a sweeping look at everything new that is coming in the world of Autodesk this year.
I say "joy", because Autodesk is typically demo-ing new products and new features - hopefully both the things that we've always wanted, and the things we never knew we wanted. I say "pain" because inevitably there will be features that STILL after begging, pleading, business cases and everything else - still didn't make the cut.
I'll be blogging from the show more actively this year, but most of the ADN content still happens on just Tuesday.
The other challenge will be figuring out what I'm aloud to say... The ADN conference is all technically under non-disclosure... So while I'll be learning all about new things - I'm probably restricted from blogging about them. So we'll have to see how we walk that tightrope. I believe that things covered in the AU general session (which usually has it's share of sizzle) will be fair game for blogging.
Case in point - I think that Shaan Hurley made the first public announcement that AutoCAD 2008 will have a 64-bit version. Now that's out of the bag - and although I've "sort of" known that it's been coming for 6 months, I'm still grappling with what it will mean for us... How quickly will our customers move? How are all of my developers going to build and test 64-bit versions?
Finally, we're entering the season where I'll have lots to talk about - new releases of all of the Autodesk 2008 product line, and their corresponding APIs... But that's still a ways off yet.
In any case, it's an exciting time of year.
Posted by
Matt Mason
at
1:53 PM
0
comments
Labels: Events
Wednesday, September 13, 2006
.NET vs. COM in AutoCAD - What should I use?
Kean Walmsley writes about the pros and cons of .NET vs. COM in AutoCAD on the "Through the Interface" blog.
In general, a good article - but I don't think it addresses two of the biggest "gotchas" of AutoCAD.NET...
The Blessing/Curse of Versions
One of the goals of .NET was to avoid some of the issues of "DLL Hell", where different programs linked with different versions of DLLs without worrying about whether the differences were significant.
Now when I make an AutoCAD.NET application, it gets linked against the file "acmgd.dll" version 17.0.54.0 (in vanilla AutoCAD 2007). If 17.0.54.0 is not available later, you're out of luck...
Problem #1: Versions within AutoCAD and vertical Releases
In the AutoCAD 2005 release, we ran into a problem where vanilla AutoCAD was version 16.1.63.0, but the version of Autodesk Map3D 2005 and in various service packs was version 16.1.84.0...
Now - Autodesk has been far better about being nice about not changing the version randomly in 2006 and 2007... But there may come a time when it's necessary in mid-release, and that makes a lot of stuff break!
Problem #2: Versions between AutoCAD Releases
This one there's really no getting around... Each release of AutoCAD will have a different version of acmgd.dll... And as a result, your application will need to be recompiled for each version.
This is a disadvantage compared to both ARX and COM... In ARX, Autodesk has been fairly succesful at making ARX applications binary compatible within 3 release blocks (2004, 2005, 2006, for example)... With COM, I suspect because the COM layer "insulates" the application from changes even further, there are people who can still run the VB application they wrote for AutoCAD 2000 in AutoCAD 2007 (OK, so there might be some changes - but it's the exception rather than the rule)...
Summary
Don't get me wrong - I'm still a HUGE fan of .NET for application development... But the benefits that it brings are not without their costs compared to ARX and COM. I've also noticed that there may be some relief from this in Visual Studio 2005 (although I don't quite have my head wrapped around the "Specific Version=FALSE" option).
Editor's Update: Kean has put in a comment that clarifies this issue:
http://www.blogger.com/comment.g?blogID=23382408&postID=115816634885341203
The short, tongue-in-cheek version: In 2005, 2006 and 2007 it was intentionally broken, but going forward it will be the same as ARX ... So 2007,2008, and 2009 would presumably be binary compatible. Thanks Kean!
Posted by
Matt Mason
at
12:22 PM
2
comments
Friday, September 08, 2006
What's new in the Revit 9.1 API?
I don't know if you're like me... but as a CAD application developer, each new release is like your birthday... You have a stack of gifts in the form of new API calls that you have access to... And it's much more intense in products that are in early stages such as Revit (as opposed to how I felt about Pro/Engineer's 24th release).
So I immediately sat down when I got my hands on the Revit 9.1 Beta and tried to understand what was new - and what each new piece of capability might mean to me (and my customers)... What new powers would we have?
Well, in all the hubbub I didn't notice that Revit 9.1 was officially released last week - so here's my notes that I've been sitting on...
To extend the birthday metaphor, some presents turn out to be rockets, other presents turn out to be socks - and still other presents, like those from "Uncle Bill", just leave you scratching your head...
Related Posts:
- Theory of CAD API Maturation (forthcoming)
- What's new in Revit 9.0?
First of all, there are a variety of new elements that can now be programmatically created:
- AreaBoundaryConditions
- BeamSystem
- LineBoundaryConditions
- MaterialSet
- ModelCurve
- ModelCurveArray
- PathReinforcement
- PointBoundaryConditions
- ReferencePlane
- Room
- RoomTag
- SketchPlane
As you can tell, this is a mixed bag - many of these are specific to analysis applications - but there are certainly some other neat ones, including Rooms and Room Tags, ModelCurves (which can include lines, arcs, splines, etc).
Materials
Materials have undergone a significant overhaul, and are much more useful. There is much better definition and control of material types (including specific handling for Wood, Steel and Concrete) - but also better handling in general for things like rendering, smoothness, shininess, fill/cut patterns, etc... Some of these things used to be available via the built in parameters on the Material Element - but many have now been promoted to actual class members, and they work much better that way...
Rooms/Room Tags
One of the nice pieces for FM or space planning related applications is being able to create Rooms, and be able to read and create Room Tags. As a side note, Room Tags can tell which Room they are associated with (however, Rooms don't know their tags).
Detection of Current Display Units
At last!!! How could we ever live without this?!?! Particularly for those of us who work in both metric and imperial worlds, and those of us who dream of someday writing a packaged application for Revit!
Suspension of Disbelief
OK, so actually it's called "SuspendUpdate" mechanism - and it allows you to temporarily suspend Revit's updates and consistency checking while you're making geometry changes. (I haven't needed it yet, but I'm sure it's there for a reason that I just haven't tripped over yet).
New Element Classes
The following elements have been promoted from type-less Elements (where you could just kind of guess what it was) to actual identifiable object status.
- Opening
- LayoutRules
- FillPattern
Generally these are things which you can now read (or update) some specifics about them - but you can't create them from scratch.
Compatibility
In terms of compatibility with Revit 9, it appears to be pretty good. The only thing I've noticed so far is that they renamed the "MaterialElement" class to just "Material" - once I fixed that everything appears to work identically.
In Summary
All in all, I have to say I got a few more socks than rockets (but that's me - who hasn't been called on to do much in the analysis integration - your excitement may vary)... But it's a solid release, and you can tell that they're committed to significant expansion of the API.
And if the various insiders that are contributing to the Revit API newsgroup are correct (here and here and here), then we have a lot to look forward to in the Revit 10 API. Maybe that will be the release that puts the API over-the-top (for me :) ).
Posted by
Matt Mason
at
8:46 PM
3
comments
Thursday, September 07, 2006
Dealing with .NET 2.0
OK, so this is a little bit off my mainstream topics of CAD-specific application development... But I'm hoping that it's useful either to the CAD people or .NET developers in general...
As you may know, in the CAD world, we're (finally) being driven to .NET 2.0 (at least in the Autodesk world - I get the sense that the PTC/Dassault/UGS worlds, which are still multi-platform, are not pushing it as aggressively)...
For example:
- AutoCAD 2007 - DotNet 2.0 mandatory
- Revit 9.0 and 9.1 - DotNet 2.0 mandatory
But I ran into a problem with two of our clients in the same week, with the same issue in different applications. In both cases, they were deploying our applications onto new machines. And when they tried to run the applications, in both cases they got:
System.TypeLoadException: Could not load type`system.runtime.compilerservice.runtimecompatibilityattribute`from assembly`mscorlib, Version=2.0.0.0, Culture=neutral, publickeytoken=b77a5c561934e089`"
(or something close to that)...
What was the issue? In both cases, the machines had .NET 2.0, but they had the BETA version of DotNet 2.0 installed (build 2.0.50215). But the behavior was strange - some of the code executed, but other parts didn't... In any case, the TypeLoadException should be a red flag for developers.
How is it that these people had beta versions of .NET running around? Who knows... Obviously some early-adopter-developer sent them something that required it, and now we have to deal with the aftermath!
This is a complicated issue - I'm pretty sure that AutoCAD 2007 installs 2.0 as a pre-requisite. However, the Revit products do not (and our other product was a self-contained Vault application)...
So - to paraphrase Esterhaus on the police drama Hill Street Blues, "Let's be careful out there".
(Check during install for the existence of C:\Windows\Microsoft.NET\Framework\v2.0.50215, perhaps?).
Posted by
Matt Mason
at
10:07 PM
0
comments
Thursday, July 20, 2006
Vault Utility with Civil3D
The introduction of Autodesk Vault into the Civil3D product line is generating some interest in the custom work we've done with Vault... in particular:
- Automated Vault Backup, which not only schedules the backup, but also sends the admin a nice report about the status of the backup.
- Active Directory Integration, batch-load a bunch of users from Active Directory into Vault, or even do synchronization and/or authentication against any LDAP database.
New Project from Template Tool
We also just completed a tool which addresses something that doesn't seem quite right... the lack of a template project infrastructure within Vault/Civil3D. While Vault can do a "Design Copy", that typically works against a single parent file, rather than a whole folder. Our tool allows you to point to multiple Vault folders as "templates", and makes it easy to get a new project folder with all of the files renamed with a job name/number (and all the XREFs preserved).
These are still custom solutions (not packaged)... but if anyone had interest in them, drop a line to devfeedback@avat.com.
Posted by
Matt Mason
at
6:58 PM
0
comments