Reads and writes Autodesk Revit elements and parameters using Nice3point.Revit.Extensions fluent accessors. Handles ElementId resolution, parameter lookup by BuiltInParameter/Guid/name, typed value reading, unit conversion, and transactional writes.
Ships in revit-api. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The Nice3point.Revit.Extensions accessors wrap the raw element and parameter API — document.GetElement(id) as T, the different raw parameter getters, manual StorageType switching, and UnitUtils — into one fluent, nullable chain.
FindParameter also falls back to the element type when the instance lacks the parameter.
Element by ElementId.revit-element-collector.var wall = wallId.ToElement<Wall>(document);
var view = elementId.ToElementOrDefault<View>(document);
ToElement throws when the element is missing or not that type; ToElementOrDefault returns null.
var parameter = wall.FindParameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM);
FindParameter accepts a BuiltInParameter, ParameterTypeId, Guid, or name, and returns the type's parameter when the instance has none.
It returns null when the parameter is absent — null-check for optional parameters.
double heightFeet = parameter.AsDouble(); // native api call
bool isStructural = wall.FindParameter(BuiltInParameter.WALL_STRUCTURAL_SIGNIFICANT).AsBool();
Color color = door.FindParameter("Door color").AsColor();
Level level = wall.FindParameter(BuiltInParameter.WALL_BASE_CONSTRAINT).AsElement<Level>();
Material? material = door.FindParameter("Door material").AsElementOrDefault<Material>();
Revit stores lengths in feet. Convert a value when it is read from or written to the model.
double heightMm = parameter.AsDouble().ToMillimeters();
parameter.Set(3.0.FromMeters());
door.FindParameter("Door color").Set(new Color(66, 69, 96));
Writes require an open transaction.
ElementId is resolved with ToElement<T> or ToElementOrDefault<T>, not GetElement(id) as T.FindParameter, and optional ones are null-checked.| Pitfall | Correct approach |
|---|---|
document.GetElement(id) as Wall | id.ToElementOrDefault<Wall>(document). |
Choosing among get_Parameter/LookupParameter/GetParameter | FindParameter(...) searches the instance and its type. |
| Using a raw feet value as millimeters | Convert with .ToMillimeters() / .FromMeters(). |
ToElement/FindParameter not found | The Nice3point.Revit.Extensions package is not referenced. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/revit-api:revit-element-and-parameter-accessfrom revit-api
npx claudepluginhub nice3point/revit-skills --plugin revit-api7 skills in this plugin
/revit-api-option-handlersSupply small Autodesk Revit API callback interfaces with Nice3point.Revit.Toolkit ready-made handlers, not hand-rolled classes. USE FOR: passing IFamilyLoadOptions, IDuplicateTypeNamesHandler, or ISaveSharedCoordinatesCallback to a Revit API call. DO NOT USE FOR: constraining what a user can pick in an interactive selection, or building a dockable pane's UI element.
/revit-code-styleStructure Autodesk Revit API code — API boundaries, document and transaction lifetime, thread affinity, and converting Revit objects to plain models. USE FOR: structuring Revit API code — which projects may reference Revit types, which scope opens and closes a document, how to scope a transaction, thread affinity, and converting Revit objects before they cross a service or process boundary. DO NOT USE FOR: the mechanics of individual model operations (querying, parameter read/write, *Utils wrappers), which have their own focused skills — apply this to the structure around them.
/revit-element-collectorQuery the Revit model with the Nice3point.Revit.Extensions fluent FilteredElementCollector wrappers; filter with Revit's parameter filters, not by loading elements and filtering with LINQ. USE FOR: writing or reviewing element queries that filter by class, category, or parameter value and return the first match, a count, or the full set. DO NOT USE FOR: reading or setting parameters on an element already retrieved (use revit-element-and-parameter-access).
Other plugins' skills for the same job