What are the most interesting 2014 API topics?

Here’s an overview of the big new areas of the 2014 API. If you leave some comments about what topics you’d like to learn more about, I will do some posts on those topics.

  • Worksharing – reload latest, synchronize with central, editability of elements and worksets, enabling worksharing
  • RVT Links – selecting elements in links, creating rooms in links, loading, unloading, and more
  • Views – category overrides, filters, non-rectangular crop regions, zoom level control,
  • Views on sheets – rotation, better positioning, revisions
  • Exploded views
  • Macros – API to run, edit, and create macros
  • Import – SAT, SketchUp, DWF files, export to Navis
  • Site – API for toposurface, regions, and building pad
  • Paint tool API
  • Component repeater API
  • Copy/Paste API
  • Running a Revit UI command after an API command completes
  • Project Browser interaction with the API
  • Units – formatting, parsing, and converting
  • Schedules – appearance and formatting

11 thoughts on “What are the most interesting 2014 API topics?

  1. Here’s the “What’s New” section on RVT Links. What in this list do you find particularly intriguing?

    Identifying links

    The property:

    · Document.IsLinked

    identifies if a document is in session because it is a linked Revit file.

    Obtaining linked documents

    The method:

    · RevitLinkInstance.GetLinkedDocument()

    gets the document that corresponds to an Revit Link instance.

    Link creation

    Two functions have been added to RevitLinkOptions, used to specify options for RevitLinkType.Create.

    · RevitLinkOptions.GetWorksetConfiguration()

    · RevitLinkOptions.SetWorksetConfiguration()

    This allows the user to specify which worksets should be opened when creating and loading a new Revit link.

    Link load and unload

    The methods

    · RevitLinkType.Load()

    · RevitLinkType.LoadFrom()

    · RevitLinkType.Unload()

    allow a link to be loaded or unloaded, or to be loaded from a new location. These methods regenerate the document. The document’s Undo history will be cleared by these methods. As a result, this function and others executed before it cannot be undone. All transaction phases (e.g. transactions, transaction groups and sub-transactions) that were explicitly started must be finished prior to calling this method.

    Link shared coordinates

    The methods:

    · RevitLinkType.SavePositions()

    · RevitLinkType.HasSharedCoordinatesChanges()

    support save of shared coordinates changes back to the linked document. While this operation does not clear the document’s undo history, you will not be able to undo this specific action, since it saves the link’s shared coordinates changes to disk.

    Link path type

    The property:

    · RevitLinkType.PathType

    allows read and modification of the path type associated with a link.

    Conversion of geometric references

    The new APIs:

    · Reference.LinkedElementId

    · Reference.CreateLinkReference(RevitLinkInstance)

    · Reference.CreateReferenceInLink()

    allow conversion between Reference objects which reference only the contents of the link and Reference objects which reference the host. This allows an application, for example, to look at the geometry in the link, find the needed face, and convert the reference to that face into a reference in the host suitable for use to place a face-based instance. Also, they would allow you to obtain a reference in the host (e.g. from a dimension or family) and convert it to a reference in the link, suitable for use in Element.GetGeometryObjectFromReference().

    Room tag creation from linked rooms

    The new method:

    · NewRoomTag(LinkElementId roomId, UV point, ElementId viewId)

    can create room tags in Revit Links.

    Picking in links

    PickObject() and PickObjects() now allow selection of elements in RVT Links.

    • Sure. Is there anything in particular about schedules that interests you from this list of What’s New?

      ViewSchedule is now a child of TableView. All previously existing ViewSchedule API is still valid, but TableView also brings in a set of APIs related to:

      · Table sections (header and body)

      · Table formatting

      · The contents of individual table cells

      There are methods on TableView (and its constituent TableData and TableSectionData class) that are useful for Electrical Panel Schedules and some varieties of specialized schedules but forbidden for use with standard Revit tabular schedules generated from Revit content (e.g. InsertRow(), RemoveRow()). Use of these functions on standard Revit schedules will result in an exception.

      Some new members were introduced on schedule related classes:

      · ScheduleField.SetStyle()

      · ScheduleField.GetStyle()

      · ScheduleField.IsOverridden

      · ScheduleField.ResetOverrides()

      · ScheduleField.GetFormatOptions()

      · ScheduleField.SetFormatOptions()

      relate to the style and formatting applied to schedule columns, and:

      · ScheduleField.IsCalculatedField

      · ScheduleField.IsCombinedParameterField

      · ScheduleField.HasSchedulableField

      relate to information about the type of a field.

      The new members:

      · ViewSchedule.GetFontId()

      · ViewSchedule.AddFontId()

      provide access to fonts stored in the table and applied to cells.

      The new members:

      · ViewSchedule.GroupHeaders()

      · ViewSchedule.UngroupHeaders()

      · ViewSchedule.CanGroupHeaders()

      · ViewSchedule.CanUngroupHeaders()

      affect header grouping in the schedule.

      The new method:

      · ViewSchedule.GetTableData()

      returns the object which provides access to the sections of the table.

      • Good morning,
        With the new formatting and appearance API in Revit 2014, would it be possible to flip the rows and columns of a schedule? That way the parameters would go down the left hand side (rows) and the family instances would go across the top (columns). We have mechanical schedules that reach across a full size sheet and this could be really useful if its possible. Thanks for everything you do.

        • Sorry, there is no API to do anything that invasive to the schedule. The formatting and appearance API exposes some things that have been possible to do through the UI such as getting & setting the text type for the title, header, and body of the schedule and grouping and ungrouping headers.

          You could use the API to create a fake schedule by reading the schedule data and creating a drafting view with text labels to reorganize the data in a format of your choosing, but that would be a bit of work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s