From 19c18e829968fea1c51775aee2a81fe6c441c954 Mon Sep 17 00:00:00 2001 From: mtouchard Date: Wed, 9 Jul 2025 11:10:08 +0200 Subject: [PATCH] add documentation to make it easier for futur users small fixes --- README.md | 18 +++++++ command.json | 52 +++++++++++++++++++ .../Commands/TagWallsCommand.cs | 2 +- .../RevitMCPCommandSet.csproj | 4 ++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 command.json diff --git a/README.md b/README.md index 0c0ecd0..859e836 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # revit-mcp-commandset 🔄 Revit-MCP Client | Core implementation of the Revit-MCP protocol that connects LLMs with Revit. Includes essential CRUD commands for Revit elements enabling AI-driven BIM automation. + +# Custom Commands Setup + +## Installation + +1. Create folder: `RevitMCPCommandSet` at the end of the usual Revit addins directory like so `C:\Users\[USERNAME]\AppData\Roaming\Autodesk\Revit\Addins\20XX\RevitMCPCommandSet\` + +2. Add files: + - Copy `command.json` from this repo to the `RevitMCPCommandSet` folder + - Create `20XX` subfolder + - Place compiled output from this repo in the `20XX` subfolder + +3. In Revit: Go to **Add-ins** > **Settings** > **Refresh** > **Save** + +## Important Note + + - Command names must be identical between `revit-mcp` and `revit-mcp-commandset` repositories, otherwise Claude cannot find them. + - The `commandRegistry.json` is created automatically, do not import it from the installer. \ No newline at end of file diff --git a/command.json b/command.json new file mode 100644 index 0000000..159aaa1 --- /dev/null +++ b/command.json @@ -0,0 +1,52 @@ +{ + "name": "RevitMCPCommandSet", + "description": "Basic command collection for Revit AI assistance", + "developer": { + "name": "revit-mcp", + "email": "", + "website": "", + "organization": "revit-mcp" + }, + "commands": [ + { + "commandName": "say_hello", + "description": "Displays a greeting dialog", + "assemblyPath": "RevitMCPCommandSet.dll" + }, + { + "commandName": "get_available_family_types", + "description": "get available family types", + "assemblyPath": "RevitMCPCommandSet.dll" + }, + { + "commandName": "get_current_view_elements", + "description": "get current view elements", + "assemblyPath": "RevitMCPCommandSet.dll" + }, + { + "commandName": "get_current_view_info", + "description": "get current view info", + "assemblyPath": "RevitMCPCommandSet.dll" + }, + { + "commandName": "create_Wall", + "description": "create a wall", + "assemblyPath": "RevitMCPCommandSet.dll" + }, + { + "commandName": "delete_element", + "description": "Deletes elements using ElementId", + "assemblyPath": "RevitMCPCommandSet.dll" + }, + { + "commandName": "tag_all_walls", + "description": "Tag all the walls in the model", + "assemblyPath": "RevitMCPCommandSet.dll" + }, + { + "commandName": "create_line_based_element", + "description": "Create line based element such as wall", + "assemblyPath": "RevitMCPCommandSet.dll" + } + ] +} \ No newline at end of file diff --git a/revit-mcp-commandset/Commands/TagWallsCommand.cs b/revit-mcp-commandset/Commands/TagWallsCommand.cs index 7af48d3..92a3954 100644 --- a/revit-mcp-commandset/Commands/TagWallsCommand.cs +++ b/revit-mcp-commandset/Commands/TagWallsCommand.cs @@ -12,7 +12,7 @@ public class TagWallsCommand : ExternalEventCommandBase /// /// 命令名称 /// - public override string CommandName => "tag_walls"; + public override string CommandName => "tag_all_walls"; /// /// 构造函数 diff --git a/revit-mcp-commandset/RevitMCPCommandSet.csproj b/revit-mcp-commandset/RevitMCPCommandSet.csproj index f22922a..62c1fa2 100644 --- a/revit-mcp-commandset/RevitMCPCommandSet.csproj +++ b/revit-mcp-commandset/RevitMCPCommandSet.csproj @@ -55,4 +55,8 @@ + + + + \ No newline at end of file