Skip to content
Nice3point edited this page Apr 1, 2025 · 5 revisions

The main feature of RevitLookup is Revit objects analysis, exploring element properties, methods, and events. This is similar visiting the Revit API documentation, but with evaluated values for specific objects. All values are evaluated in real-time, which accelerates debugging, plugin development, and family modeling.

RevitLookup provides a comprehensive set of objects to explore, including root objects such as Application, Document, UIApplication, as well as specialized objects like Services, Updaters, and Performance Issues.

You can find all these objects on the RevitLookup main page, where each section provides different sets for analysis:

image

When navigating to an object, you'll see a complete analysis of properties and methods, evaluated at runtime. The left side displays the tree of analyzed objects, while the right side shows the members (properties, methods, events) of the selected object and their evaluated values:

image

The table is vertically divided into groups, each providing information about members for a specific type, taking inheritance into account.

For example, the Id row in the Element group corresponds to the Id property of the Autodesk.Revit.DB.Element type.

Value Representation

RevitLookup uses special notations for values representation:

  • <null> indicates a null reference
  • <empty> indicates an empty string

Visual Representation

To better understand the API, RevitLookup provides visual representations for certain types. For example, properties representing colors have color indicators directly in the UI:

image

Evaluation Variants

Some methods require dynamic input parameters, and RevitLookup can evaluate them for multiple values. These cases are marked with the Variants<T> type and represent a list of possible values, which will strictly depend on what is passed to the method. This feature is particularly useful when exploring methods that can accept different parameter types or when analyzing method overloads. Consider this when using these methods in RevitAPI.

image

Navigation

Exploring Nested Objects

You may notice that some members are highlighted in color, indicating they contain complex objects or collections of objects. Click on these rows to open a new window for further analysis of these objects.

Revit_8U7PLsALiY

Multi-Window Analysis

Sometimes you may want to open an object or group of objects in a separate window for convenient viewing. Hold Ctrl and click on the object or group of objects.

image

Most object members are not available for navigation, as there's no need to analyze primitive types. However, some may be unsupported classes, or you might want to explore the contents of a class. Hold Ctrl and click on a member to analyze it in a new tab.

image

Documentation

The context menu includes commands to search for help on specific members or navigate to Microsoft documentation pages for system .NET types.

image

Member Display Configuration

Value analysis customization is quite flexible. You can configure what you want to see in the context menu. Don't want to see events? Hide them. Want all API methods? Enable Unsupported.

Root Members

By default, RevitLookup hides root members, such as HashCode and Type. These members are inherited from the base .NET System.Object class. You can display them using the following option:

image

Extension Methods

The RevitAPI includes a large set of Utils classes that don't belong to the object itself but work with it. RevitLookup allows you to display methods from Utils and other classes directly in the object. For example, the util method DocumentValidation.CanDeleteElement in RevitLookup is available as an extension method CanDeleteElement for the Element class.

image

List of available extensions: https://github.com/lookup-foundation/RevitLookup/wiki/Extensions

Unsupported Members

RevitLookup provides evaluation of properties, void methods, and a large number of parameterized methods. However, most Revit API methods require dynamic values from the user and strictly depend on the context of use. For example, to calculate a distance, two points are needed, and RevitLookup doesn't know which points to pass to the method. In such cases, the method is marked as Unsupported and hidden from the results. To display all available members in the API, enable Unsupported in the context menu.

image

Private Members and Fields

Sometimes Revit API doesn't provide needed properties or methods, or they might be hidden. Enable the corresponding option to display restricted knowledge. To call private members in code, you must use reflection only, which is a risky approach and not recommended for use.

image

Metrics

In addition to evaluated values, you can display performance metrics such as time and memory spent on evaluation. Only managed memory is analyzed, ignoring C++ allocations. This can be useful for avoiding frequent calls to slow methods or caching values. Note that some of these are cached by Revit, so for more accurate results, press Refresh multiple times.

image