Diving into the API

For Revit users

Moderators: Tim Waldock, monumentum, Toby Maple

Diving into the API

Postby corinoco » 01 Jun 2012, 09:56

It's time to learn the API. In the past week I've pretty much exhausted the options PowerShell has (try it, it's fun! Need to view 59,000 files in date order? SORTED!) so now I'm into the Rvit API.

Task 1 - the traditional Hello World|Universe|Sailor app.

Step 1 - read API docs first...

I got this far:

Since Revit stores lengths in feet and other basic quantities in metric units, a derived unit involving length will be a non-standard unit based on both the Imperial and the Metric systems. For example, since a force is measured in "mass-length per time squared", it is stored in kg-ft / s2.


...and fell of my chair. :shock:

Sorry, did I just read
kg-ft / s2
R U serious Autodesk? Mixed-system, non standard units? What could possibly go wrong?

You mean I have to write code in IMPERIAL for length and METRIC for everything else. Really? :shock:

I really, really hope Space-X aren't using Autodesk products!

IN OTHER NEWS: I did get a simple macro working. It's not big, it's not clever, but if you take a screenshot while Revit is running, instead of the screenshot it puts the text "Hello Sailor" into the clipboard instead. Well, it excited me. :lol:
Adrian Esdaile
Master of the BAN-HAMMER!
Amalgamated Union of Philosophers, Sages, Luminaries and Other Professional Thinking Persons
Sector ZZ9-Plural-Z-Alpha Division

Why not visit the Early Ediacaran on your next holiday? FREE MATRESSES!
User avatar
corinoco
Active member
 
Posts: 81
Joined: 30 Apr 2006, 20:18
Location: Sydney, Australia
Real Name: Adrian Esdaile
Company: Woolworths Limited
When did you start to use Revit?: v4.1 2002

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron