Here is my report on Wednesday at Autodesk University, following the DevDay pre-event conference on Monday and the first real day at AU on Tuesday.
These are my main activities of the day in chronological order, plus pointers to a fantastic class or two that I missed and want to highlight anyway:
This is an utterly fantastic presentation on highly professional worldwide BIM collaboration for fun by Mike Slessor, Jonathan Lock, Ken Enright and Casey Rutland of ARUP. I was unfortunately unable to attend, since it took place at the exact same time as my first class on advanced Revit 2014 API features and samples early Tuesday morning: MP2845 – Virtually Human: Modelling the Human Body Inside and Out Using BIM Platforms. They say:
The study of human anatomy has traditionally been the domain of physicians, dentists, physiotherapists, nurses, paramedics, and other health professionals. What happens when you let building designers have a crack at replicating it? This class provides you with the opportunity to meet Project OVE, Arup’s virtual human. OVE has a full structural skeleton and respiratory system. OVE sweats, gets hungry, and even has a heart. We are still working on the operating system but OVE has a huge brain that will act as the main control centre when finished. However, OVE is also more than just an artificial replication of the human body. Creating an intelligent version of OVE required us to exploit the full potential of Revit as a state-of-the-art BIM (Body Information Modelling) tool.
Here is the 161-page class handout PDF, which I find absolutely fascinating.
Another class that I was unfortunately unable to attend yet take a special interest in is William Spier's FB2938 – Design to Fabrication: Design, Validate, and Fabricate Anything Between Revit and Inventor.
William asked me to implement the ExportCncFab add-in, originally published in March under the name ExportWallboard to automatically isolate and export wall parts individually to DXF for CNC fabrication.
Now, after a minute last-minute hiccup that we solved end of last week and over the weekend, the add-in is up and running as expected, including the external application driving the user interface and the new shared parameter generation command.
The updated version is available from the ExportCncFab GitHub repository, and the current version is release 2014.0.0.11.
This is only one of the many powerful fabrication solutions and paths that William developed and presents, though.
Here is current version of his complete handout and slide deck.
The one and only class that I was able to participate in so far without carrying any responsibility whatsoever for myself was Scott Conover's DV1888 – Facing the Elephant in the Room: Making Revit Add-ins That Cooperate with Worksharing.
I am so glad that I did, because the information presented there is absolutely invaluable.
At the moment, it is available only from the Autodesk University site.
We will certainly return to this topic and publish all the material as soon as it is finalised.
This is too important to ignore, and too complex to understand without some expert guidance.
The worksharing class was followed by the roundtable session DV3464-R – Making Revit Add-ins That Cooperate with Worksharing with a dozen expert Revit API and product users plus Sasha, Scott and Jeremy.
I took some notes, and so did Sasha and Scott, so we will wait with publishing those until they have been consolidated.
The next class that I took responsibility for myself is the DV1914 Revit API roundtable inviting the participants to interact with a panel of Revit API experts from Autodesk to get answers to their questions and discuss all relevant customisation topics of their choice. This is the perfect forum to get to know better some of the people who shape the APIs you work with and to explain your views, ideas, and problems directly face-to-face.
Many thanks to all the more than 50 participants of this session, and especially to the following panellists who collectively answered the many interesting questions that were raised:
This session was recorded. I uploaded a rather low quality version of the 60-minute recording. Luckily, a better quality one was made in parallel by the AU technical staff, and we will have to wait a while for that to become available.
Here are the questions and answers brought up during this roundtable session, almost unchanged from the original form they were jotted down in, and also added to the updated handout:
[q] modify visibility of linked files per view?
[a] currently no API access.
[q] modify selection from a modeless context, how to update view?
[a] check it out in UR2, it should be fixed.
[q] Revit materials. when i try to read bitmap from asset, the bitmap path in the asset property is not consistent. for some materials you can access the full bitmap path, but sometimes there is no entry for the bitmap itself. is there a better way to get the bitmap from materials?
[a] going forward, we definitely are looking at better access to material asset info.
[q] Revit API preview window to display sheets will not dynamically update when we change sheet name or number, so we have to create a new sheet in order to force it to update. part 2: preview window. will it be made more dynamic?
[a] i am not aware of any such issue, please report to ADN, we want to hear about this. post it on the forum so we can track it. we will research and submit an issue if needed. part 2, improvements: we can discuss a little more what you are looking for. some of our exports use the preview window, you can toggle things on and off, we need to hear what you need.
[q] acad has COM + .NET interface to access from outside, open and close documents and start up and shut down autocad. is this possible in Revit?
[a] we do not currently have that. use the external event mechanism instead.
[q] i have an app that opens Revit and configures worksets. it crashes now and again and the problem is reproducible. response: it only happens when you are using Revit server, and the API is not fully supported for that.
[a] the API should support that, there are no limitations for Revit server.
[q] working with schedules and accessing a parameter from schedule or from an element there is a difference. the id is the same. wanted to distinguish between a project and a shared param with the same name.
[a] element ids are used to represent elements, parameters and categories. for params, the id may be negative, e.g. bip, or non-negative, custom or shared. when you call get element on that id, it returns the parameter definition. probably that object does not have an exposed subclass in that context. there is difference between newer and older environments, and the schedule API is newer.
[q] use cut and paste API to import new sheets. the DuplicateViews SDK sample does drafting views and schedules. any advice for sheets?
[a] the mechanics for sheets would be the same. probably best to copy them together, because then Revit can do an optimal job of maintaining relationships. bring in the empty drafting views and settings all together. DuplicateViews demonstrates these two steps.
[q] any plans for enhancing this?
[a] it is already perfect. Revit uses it internally also.
[q] non-technical: collaboration between dynamo and API team?
[a] there is a group of dynamo guys all around us, they are in the same office. we try to expand Revit development in all directions.
[q] purge all. any chance of exposing that, purge unused?
[a] who needs a purge API? lots.
[q] convert an element from linked file and put them into the host document. can i do that?
[a] copy monitor approach lets them remain in the link, and the copy paste API can bring them in properly. use copy paste and then delete the linked element. that will require unloading it. depending on what element you ant to bring over, it may run into problems trying to separate it from its relationships. it might bring it in with the right shape. otherwise you might need to read boundaries and recreate it. if you bring it in as is it will be looking for sketch curves in the wrong place.
[q] macro ide. structural company, little API programs passed out to customers, using macro to transfer to customer, but it is not so simple. to transfer macros to customer it is a bit more complicated.
[a] you could use the python shell. why not make it an external command and send the dll? then the user does not have to touch anything. you can embed the macro in the model, and then there is no code to transfer. the macro does actually generate a mini little hidden DLL that you can transfer to the customer.
[q] add-in existing with a project. can they be bundled?
[a] only macros and dynamo scripts. the exchange store is actually the most official avenue. we are interested in people sharing code, but it also worries some. you have many options.
[q] furniture in Revit families including 150 types. easy way to create blocks of every time. create a symbol library. can that be dome programmatically?
[a] yes, simple to solve, has been published.
[q] reload the keynote file?
[a] yes, we are looking at that for the future. right now it can be solved using an autohotkey script. in 2014 you can also post the command.
[q] can i access the Revit line pattern from a Revit style? line weight is available.
[a] augusto wrote a code about that a few weeks ago. you have to search the assets.
[q] create or control underlays in a section view, like the ones you have in plan view? structural engineering in chile requires you to show the projected elements in front and behind. underlays in the views would solve this.
[a] probably not exposed. that si a good request to make. we have 11500methods and classes, we do not always know. augosto saw a solution involving moving the selection a bit. this is not API functionality, but basic Revit platform functionality expansion request, been requested for ten years.
[q] extensible storage available in families?
[a] yes. there is a sample that demonstrates this in the original estorage au materials.
[q] basic file info, transmission data. can a few more areas be opened up, e.g. view sheet list? now i have to open the file, export the view list, close the file.
[a] yes, that is the current approach. file a request, please.
[q] furniture geometry has a huge amount of unique vertices. how can i reduce that? i need it for a webgl viewer.
[a] Revit is good at optimising. something is curved. Revit likes to triangulate things. there are some knobs that you can use to turn down the triangulation. ifc uses the solid tessellation routine added in 2014. if you are exporting solids, take a look at that. the normal tessellation routines do not line up adjacent faces. doing the whole solid in one go is better. another approach is the custom exporter. then you do not need to think about each element.
[q] document changed event tracks changes. how do i know exactly what changed, and what the old value was?
[a] you have to cache all the values of interest beforehand. we have a similar request around what was deleted.
[q] dual monitor support, how can i take some things outside of the Revit window? it seems to work on autocad.
[a] you can create a modeless dialogue, attach it to the Revit parent window and drag it off the screen.
[q] single core. multicore machine. how can i know what thread Revit is using?
[a] the windows processes can be queried. look for the revit.exe process and the .NET Process library. this is Windows API, not Revit API.
[q] some params have type of colour and bring up a dialogue when the user edits them. can i create a shared param to store a colour as well?
[a] Revit implements some parameters that map to custom behaviour and launch dialogue. this is not accessible programmatically.
[q] can i raycast onto a non-planar surface?
[a] the ReferenceIntersector ray cast utility can be used, but only ray by ray. the extrusion analyser only goes onto a flat plane. you could make repeated calls to the extrusion analyser call for each facet of the tessellated surface.
Many thanks to all who joined in here!