AU Classes on Python, UI, Server and Framework APIs

Thursday was another very full and fruitful day at AU.
I gave my third and last class, the most exciting one in my eyes, on some UI and integration aspects.
I was unable to attend Iffat May’s class introducing Python and using it in Revit and Vasari via RevitPythonShell, but I love her material so much I am including it anyway.
Adam Nagy presented a class addressing cloud and mobile development and the Revit Server API.
Finally, Arnošt Löbel provided a peek behind the scenes and into the depths of the fundamental frameworks underlying the Revit API.

Here they are in chronological order:

  1. CP3837-L
    Scripting with RevitPythonShell in Vasari by Iffat May.

  2. CP4107
    Let’s Face It: New Revit 2013 User Interface API Functionality by Jeremy Tammik.

  3. CP3093
    My First Cloud/Mobile App with Revit Server by Adam Nagy.

  4. CP3426
    Core Frameworks in the Revit API by Arnošt Löbel.

I am including the class materials below, for your and my own convenience, and also to ensure that all this juicy stuff really is picked up and returned by Internet search engines.

1.
CP3837-L
RevitPythonShell in Vasari

Iffat provides an entire introductory tutorial to the Python programming language, and then shows how to apply it to solve a number of useful tasks in Revit and Vasari.
She makes use of Daren Thomas’
Revit Python shell,
originally implemented for Revit 2010, then for

Vasari
,

Revit 2012 and Vasari 2.1
,
and now available for Revit 2013.

RevitPythonShell introduces interactive scripting ability to Revit and Project Vasari.
Designers now have the ability to interactively design and manipulate Revit elements using algorithms and computational logic.
The class explores the Python structures, variables, data types, and flow control, and shows how to use them to create scripts to control Revit elements dynamically.

2.
CP4107
Revit 2013 User Interface API

This class takes a deeper look at the new user interface and add-in integration functionality provided by the Autodesk Revit 2013 API.
It covers 2013 features including Options dialogue custom extensions using WPF components, subscription to Revit progress bar notifications, embedding and controlling a Revit view inside an add-in dialogue for preview purposes, the new drag and drop API, and the UIView.
This class is complementary to and expands on CP3272, a Snapshot of the Revit UI API:

  • Document management and View API
  • Revit progress bar notifications
  • Options dialogue WPF custom extensions
  • Embedding and controlling a Revit view
  • UIView and Windows coordinates
  • Drag and drop

From my point of view, one of the most exciting new features provided by the Revit 2013 UI API is the possibility to correlate between Windows screen device coordinates and Revit model coordinates provided by the UIView class, which I used to examine and implement my

own Revit tooltip
,
which also makes use of the new ReferenceIntersector class and Idling event.
This has never previously been possible.
Now you can do anything you like using the Windows API and connect that intelligently with the underlying Revit model.

3.
CP3093
Cloud/Mobile App with Revit Server

This class has two objectives: to introduce you to the Revit Server REST API and to introduce you to cloud and mobile programming.

Autodesk Revit Server is a server-based file storage system that we can use to store Revit files.
It has a public API that uses simple HTTP known as REST (or Representational State Transfer).
REST is a “style” for designing network applications, and it is used to communicate between the server and a client machine.
REST is simple, yet powerful enough. You can use it from anywhere where HTTP programming is available: from a desktop, a mobile device or a server-side application.
In this class, we discuss what REST is, using the context of Revit Server.

We then go one step further and show you how to create your own REST service in .NET.
We implement it as a notification system in the cloud and demonstrate with an Apple iPad/iPhone application in Apple iOS.
At the end of this class, you will be able to:

  • Use HTTP requests to interact with a REST API
  • Programmatically access and modify data available on Revit Server
  • Create basic iOS applications in Xcode
  • Create a basic REST service in .NET
  • Use Apple Push Notification

Here is the detailed handout document:

4.
CP3426
Core Frameworks in the Revit API

A good understanding of core frameworks in the Revit API is a prerequisite for developing well behaved Revit add-ins.
Among the most important ones, the following frameworks play key roles in most applications:

  • External applications, commands, and events
  • Transactions phases
  • Regeneration and transaction modes
  • Updaters and other call-backs
  • Scoped objects and element validity

These concepts have been around for many releases, yet there are still facts about them that may not be completely understood.
This class summarizes the necessary basics, and also sheds some light on the behaviour that is normally hidden ‘under the hood’.
Knowledge acquired during this class will help Revit developers to build more efficient, safer, and robust applications.

By the time you read this, I will be sitting in the plane heading back to Europe.

Take care, and walk in beauty.


Comments

6 responses to “AU Classes on Python, UI, Server and Framework APIs”

  1. Hi Jeremy,
    Is there any way I can clone a full set of elements from one document to another using the API? I’m trying to do this with some FilledRegion’s, TextNote’s and DetailLine’s but still have no success.

  2. Dear Israel,
    Sorry, currently no, but we are working on it :-)
    All you can do at the moment is to create a completely new element in the target document and then transfer the properties one by one yourself.
    Cheers, Jeremy.

  3. Paulo McManus Avatar
    Paulo McManus

    Does your answer satisfies me too? Using Revit for Mac by the way.
    http://revitlt.co.uk/how-install-revit-for-mac/

  4. iffat mai Avatar
    iffat mai

    Thank you Jeremy for mentioning my RevitPythonShell for Vasari class! If anyone have any questions about the material, feel free to contact me at iffat.mai@perkinswill.com

  5. Dear Iffat,
    Thank you for preparing the super material in the first place.
    You provided a great way to get started with Python and play with the Revit API at the same time!
    Cheers, Jeremy.

  6. He really present a good mobile development which is really awesome.In Finland mobile and user experience is been doing very good now a days which also they are presenting the new and improve mobile development and user interface design which many people will sure love.

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading