Revit MCP Server

by ZedMoster
Verified

create_sheets

Automate the creation of numbered and named sheets in Revit, add specified views, and define title block types using JSON-RPC 2.0 for streamlined project documentation.

Instructions

批量创建图纸并添加指定视图,遵循JSON-RPC 2.0规范。

特性:

  • 支持批量创建带编号和名称的图纸
  • 可指定标题块类型
  • 支持在图纸上添加视图
  • 完善的参数验证和错误处理

参数: ctx (Context): FastMCP上下文对象 method (str): JSON-RPC方法名,默认为"CreateSheets" params (List[Dict]): 参数列表,每个字典包含: - number (str): 图纸编号(必填) - name (str): 图纸名称(必填) - titleBlockType (str): 标题块类型名称(必填) - viewName (str, optional): 要添加到图纸的视图名称(可选)

返回: dict: JSON-RPC 2.0格式的响应,结构为: 成功时: { "jsonrpc": "2.0", "result": [ { "elementId": "图纸/视口元素ID", "name": "元素名称", "familyName": "族名称" }, ... ], "id": request_id } 失败时: { "jsonrpc": "2.0", "error": { "code": int, "message": str, "data": any }, "id": request_id }

示例: response = create_sheets(ctx, params=[ { "number": "101", "name": "首层平面图", "titleBlockType": "A0 公制", "viewName": "标高 1" }, { "number": "102", "name": "二层平面图", "titleBlockType": "A0 公制" } ])

# 输出示例 { "jsonrpc": "2.0", "result": [ { "elementId": "654321", "name": "A101 首层平面图", "familyName": "图纸" }, { "elementId": "654322", "name": "视口-123456", "familyName": "视口" }, { "elementId": "654323", "name": "A102 二层平面图", "familyName": "图纸" } ], "id": 1 }

Input Schema

NameRequiredDescriptionDefault
methodNoCreateSheets
paramsNo

Input Schema (JSON Schema)

{ "properties": { "method": { "default": "CreateSheets", "title": "Method", "type": "string" }, "params": { "default": null, "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "title": "Params", "type": "array" } }, "title": "create_sheetsArguments", "type": "object" }
ID: 4dgua6bhbf