Suppresses expected Autodesk Revit warnings and failures during bounded API operations using Nice3point.Revit.Toolkit RevitApiContext. Useful for auto-resolving known failures that block document opening, family loading, or transaction commits.
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.
RevitApiContext.BeginFailureSuppressionScope returns a disposable scope that resolves or cancels Revit failures.
Use it only for a known failure the operation can safely handle — never to make an unknown failure appear successful.
RevitContext.BeginDialogSuppressionScope.Wrap only the operation that raises the expected failure, and run unrelated work outside the scope.
The scope subscribes to the application-level FailuresProcessing event, and it applies to both a transaction commit and a document open.
using (RevitApiContext.BeginFailureSuppressionScope())
{
using var transaction = new Transaction(document, "Operation");
transaction.Start();
// ... operation that raises the expected failure
transaction.Commit();
}
Opening a file can raise the same recoverable warnings. In an unattended or headless host, for example Autodesk Design Automation, no user can dismiss the warning. Open the document inside the scope:
using (RevitApiContext.BeginFailureSuppressionScope())
{
var document = RevitApiContext.Application.OpenDocumentFile(path);
}
The default resolves resolvable failures.
Pass resolveErrors: false when the caller must observe unresolved errors, not auto-resolve them.
Assert the resulting document or artifact is valid, and confirm the normal error boundary still receives an unrelated failure.
| Pitfall | Correct approach |
|---|---|
| Wrapping a whole pipeline to hide any failure | Scope suppression to the one operation that raises the known failure. |
| Suppressing a UI dialog with a failure scope | Use RevitContext.BeginDialogSuppressionScope. |
| Auto-resolving errors the caller must process manually | Pass resolveErrors: false. |
RevitApiContext not found | The Nice3point.Revit.Toolkit package is not referenced. |
What SKILL.md sets; muted values are Claude Code's defaults
/revit-api:revit-failure-handlingfrom 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-and-parameter-accessRead and write Autodesk Revit elements and parameters with the Nice3point.Revit.Extensions fluent accessors. USE FOR: finding an Element by ElementId, finding a parameter by BuiltInParameter/ParameterTypeId/Guid/name, reading its typed value, setting it, and converting internal units. DO NOT USE FOR: querying the model for a set of elements (use revit-element-collector).
/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).
/revit-extensible-storagePersist add-in data inside the Revit document with Extensible Storage, laid out as a data class, a schema definition, and a typed context per stored subject. USE FOR: storing custom data on a document or on an element, defining or evolving a schema, choosing the element that stores the data, and finding the elements that contain it. DO NOT USE FOR: reading or writing values the user sees as element parameters (use revit-element-and-parameter-access).
/revit-utils-extensionsReplace verbose Autodesk Revit *Utils static calls, static managers, and hand-written enum/id conversions with Nice3point.Revit.Extensions fluent extensions. USE FOR: any call to a SomeUtils.Operation(…) or any other static Revit API helper, any conversion or formatting of a Revit value, and any iteration of a Revit array, set, or map. DO NOT USE FOR: querying the model for elements (use revit-element-collector), or reading and writing element parameters (use revit-element-and-parameter-access).
Other plugins' skills for the same job