Supplies ready-made handlers for Revit API callback interfaces (IFamilyLoadOptions, IDuplicateTypeNamesHandler, ISaveSharedCoordinatesCallback) using Nice3point.Revit.Toolkit, eliminating hand-rolled classes.
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.
Several Revit API calls demand a small callback interface.
Nice3point.Revit.Toolkit provides ready implementations with a default behavior and lambda or enum customization.
A hand-rolled implementation of the interface is unnecessary.
IFamilyLoadOptions, IDuplicateTypeNamesHandler, or ISaveSharedCoordinatesCallback.document.LoadFamily(fileName, new FamilyLoadOptions(), out var family); //overwrite existing types, load from the family
document.LoadFamily(fileName, new FamilyLoadOptions(false, FamilySource.Project), out var family); // preserve values, load from the project
document.LoadFamily(fileName, UIDocument.GetRevitUIFamilyLoadOptions(), out var family); //reuse Revit's interactive prompt
The default constructor overwrites the parameter values of existing types.
The (overwrite, FamilySource) constructor sets both options explicitly, and UIDocument.GetRevitUIFamilyLoadOptions() shows Revit's own dialog.
var options = new CopyPasteOptions();
options.SetDuplicateTypeNamesHandler(new DuplicateTypeNamesHandler()); //default: UseDestinationTypes
options.SetDuplicateTypeNamesHandler(new DuplicateTypeNamesHandler(DuplicateTypeAction.Abort)); //fixed action
options.SetDuplicateTypeNamesHandler(new DuplicateTypeNamesHandler(args => DuplicateTypeAction.Abort)); // select the action per call
The default constructor uses the destination types.
Pass a DuplicateTypeAction for a fixed action, or a lambda that returns the action per call from the args.
linkType.Unload(new SaveSharedCoordinatesCallback()); //default: SaveLinks
linkType.Unload(new SaveSharedCoordinatesCallback(SaveModifiedLinksOptions.DoNotSaveLinks)); //fixed option
linkType.Unload(new SaveSharedCoordinatesCallback(link => //select the option per link
{
if (link.AttachmentType == AttachmentType.Overlay) return SaveModifiedLinksOptions.SaveLinks;
return SaveModifiedLinksOptions.DoNotSaveLinks;
}));
The default constructor saves the links.
Pass a SaveModifiedLinksOptions value for a fixed option, or a lambda that returns the option per link.
Call the API with the handler and confirm the intended behavior applies — the family loads with the chosen source, the duplicate resolves as selected, or the link unloads with the chosen coordinate option.
| Pitfall | Correct approach |
|---|---|
Writing a class that implements IDuplicateTypeNamesHandler | Use DuplicateTypeNamesHandler with a lambda returning the action. |
FamilyLoadOptions not found | The Nice3point.Revit.Toolkit package is not referenced. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/revit-api:revit-api-option-handlersfrom revit-api
npx claudepluginhub nice3point/revit-skills --plugin revit-api7 skills in this plugin
/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).
Other plugins' skills for the same job