The Revit 2013 SDK has been updated since its initial release. If you are using the SDK, It is recommended that you immediately switch to the updated version.
The updated SDK includes three new samples:
This sample is an external application, not a command, so you cannot test it by simply invoking it via RvtSamples. You have to copy its add-in manifest to the add-ins folder.
Once installed, it disables a command by replacing its implementation with a simple popup message. Specifically, it overrides the Design Options command, thus prevent users from accessing it. It performs the following steps:
- A RevitCommandId is found to match the journal name of the command.
- An AddInCommandBinding is created for this command id.
- An alternate implementation is provided for the command binding.
To run it, once installed, simply start up Revit, open or create a project, and choose the Design Options button on the Manage tab. A popup explains that the command is disabled.
This sample demonstrates how to create a wall category view schedule and display its data on a sheet. It performs the following steps:
- Create an empty wall schedule.
- Add some schedule fields by schedulable field.
- Create new schedule filter.
- Create schedule sorting/grouping field.
- Display a sheet containing the wall schedule.
Run it as follows:
- Open Revit and create a new project based on the default Revit template.
- Manually create a couple of walls with different types.
- Run this command, for instance via RvtSamples > Views > ScheduleAPI.
- A view schedule of wall category and a sheet to show its data are created.
This is a slightly more complex sample that creates a series of stairs, stairs runs and stairs landings configurations based upon predefined hard-wired rules and parameters. It provides an example of how to create and populate stairs elements, e.g.
- Use of StairsEditMode
- Creation of standard stairs runs
- Creation of sketched stairs runs
- Creation of sketched landings
It also implements an extensible structure demonstrating how runs and landings creation can be combined into different stairs configurations.
To test this, start up Revit and open the 'Stairs automation.rvt' sample model. Execute the command, e.g. using RvtSamples > Elements > Stairs automation. Each time the command is run, a different predefined stair configuration is created:
- Single straight stair run
- Stairs/landing combination up to level 2
- Multi-span stairs/landing combination up to level 3
- Single curved stairs run
- Curve stairs run > 360 degrees
Download the updated Revit 2013 SDK.
Credit: Jeremy Tammik's The Building Coder blog.