create_sheets
Create multiple Revit sheets with numbered titles and specified title blocks, optionally adding views to each sheet for documentation.
Instructions
批量创建Revit图纸并添加指定视图,遵循JSON-RPC 2.0规范。
特性:
支持批量创建带编号和名称的图纸
可指定标题块类型
支持在图纸上添加视图
完善的参数验证和错误处理
参数: ctx (Context): FastMCP上下文对象 method (str): JSON-RPC方法名,默认为"CreateSheets" params (List[Dict]): 参数列表,每个字典包含: - number (str): 图纸编号(必填) - name (str): 图纸名称(必填) - titleBlockType (str): 标题块类型名称(必填) - viewName (str, optional): 要添加到图纸的视图名称(可选) request_id (int, optional): 请求ID,默认自动生成
返回: dict: JSON-RPC 2.0格式的响应
示例: response = create_sheets(ctx, params=[ { "number": "A101", "name": "首层平面图", "titleBlockType": "A0 公制", "viewName": "标高 1" }, { "number": "A102", "name": "二层平面图", "titleBlockType": "A0 公制" } ])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | CreateSheets | |
| params | No | ||
| request_id | No |
Implementation Reference
- xml_revit_mcp/server.py:41-44 (registration)create_sheets is listed in ARCHITECTURAL_TOOLS array used for tool registrationARCHITECTURAL_TOOLS = [ create_levels, create_floor_plan_views, create_grids, create_walls, create_floors, create_door_windows, create_rooms, create_room_tags, create_family_instances, create_sheets ]
- xml_revit_mcp/server.py:134-147 (registration)Function that registers all tools by iterating over ARCHITECTURAL_TOOLS (which includes create_sheets), MEP_TOOLS, and GENERAL_TOOLS using server.tool() decoratordef register_tools(server: FastMCP) -> None: """注册所有工具到MCP服务器""" # 注册建筑工具 for tool in ARCHITECTURAL_TOOLS: server.tool()(tool) # 注册MEP工具 for tool in MEP_TOOLS: server.tool()(tool) # 注册通用工具 for tool in GENERAL_TOOLS: server.tool()(tool)
- xml_revit_mcp/prompts.py:45-45 (helper)Prompt documentation instructing to use create_sheets() to create sheets as part of asset creation strategy- 使用create_sheets()创建图纸
- xml_revit_mcp/server.py:248-248 (registration)Call to register_tools(mcp) which registers the create_sheets tool among othersregister_tools(mcp)
- tests/CreateSheets.py:23-23 (helper)Test file demonstrating RPC call to "CreateSheets" method, likely the underlying Revit command invoked by the MCP tool"method": "CreateSheets",