
These macros have been preconfigured to run in Revit. In the Macro Manager, you can also select any of
the VSTA sample macros, and click Edit to see the code created to run that sample. You can also select any
of the VSTA sample macros and click Edit to see the code created to run that sample.
Revit VSTA Application-level macros samples are provided with the SDK in \Revit <release> SDK\VSTA
Samples\:
■
GetTimeElapsed_CSharp
■
GetTimeElapsed_VBNet
■
Rooms
Copy these directories into C:\Program Files\Autodesk Revit Architecture
2010\Program\VstaMacros\AppHookup, and then launch Revit.
NOTE
Be sure the copied directories are writable. The application-level macros will not run correctly if they are
read-only.
Revit API Differences
Quick Reference
The following table summarizes differences between the standard Revit API and the Revit Macro API.
Revit Macro API
Standard Revit API
Feature or Capability
Declare a public method with no parameters and void
return type in the
ThisApplication
or
ThisDocu-
ment
class.
Must implement
IExternalCom-
mand
interface and its
Execute
method.
Declaration
The
this
keyword in C# points to the Application object
for application-level macros, and points to the Document
Access the
Application
object
through
externalCommand-
Data.Application
Application
object
object for document-level macros. (Use the
Me
keyword
in VB.NET). For document-level macros,
this.Applic-
Revit API Differences | 1437
Содержание 256B1-05A761-1301 - AutoCAD Revit Structure Suite 2010
Страница 1: ...Revit Architecture 2010 User s Guide March 2009 ...
Страница 4: ......
Страница 42: ...xlii ...
Страница 84: ...42 ...
Страница 126: ...84 ...
Страница 166: ...124 ...
Страница 229: ...Schedule Field Formatting Calculating Totals Specifying Schedule Properties 187 ...
Страница 230: ...Schedule with Grid Lines Schedule with Grid Lines and an Outline 188 Chapter 5 Project Views ...
Страница 304: ...262 ...
Страница 427: ...Defining the first scale vector Defining the second scale vector Resizing Graphically 385 ...
Страница 454: ...Before painting applying material to stairs 412 Chapter 8 Editing Elements ...
Страница 456: ...414 ...
Страница 486: ...444 ...
Страница 674: ...632 ...
Страница 802: ... Attachment Style Cut Column Attachment Justification Intersect Column Midline 760 Chapter 13 Architectural Design ...
Страница 809: ...Curtain wall Curtain Grid Curtain Walls Curtain Grids and Mullions 767 ...
Страница 994: ...952 ...
Страница 1016: ...974 ...
Страница 1204: ...1162 ...
Страница 1290: ...1248 ...
Страница 1318: ...1276 ...
Страница 1372: ...1330 ...
Страница 1382: ...1340 ...
Страница 1462: ...1420 ...
Страница 1492: ...1450 ...