create_door_windows
Automate the creation of door and window family instances in Revit. Specify category, family, placement coordinates, and host wall for batch processing. Includes unit conversion and error handling.
Instructions
在Revit中创建门窗族实例,支持批量创建,遵循JSON-RPC 2.0规范。 mcp_tool使用时params不要有任何注释信息
特性:
- 支持批量创建多个门窗族实例
- 自动处理单位转换(毫米转英尺)
- 支持指定族类型和类别
- 支持指定主体墙ElementId
- 完善的错误处理机制
参数: ctx (Context): FastMCP上下文对象 method (str): JSON-RPC方法名,默认为"CreateDoorWindows" params (List[Dict]): 门窗参数列表,每个字典包含: - categoryName (str): 类别名称(门或窗) - familyName (str): 族名称 - name (str): 类型名称 - startX (float): 放置点X坐标(毫米) - startY (float): 放置点Y坐标(毫米) - startZ (float): 放置点Z坐标(毫米) - hostId (str): 主体墙的ElementId - offset (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_door_windows(ctx, params=[ { "categoryName": "门", "familyName": "单扇门", "name": "915 x 2134mm", "startX": 5000, "startY": 2500, "startZ": 0, "hostId": "123456", "offset": "0" }, { "categoryName": "窗", "familyName": "固定窗", "name": "0915 x 1220mm", "startX": 8000, "startY": 2500, "startZ": 1000, "hostId": "123456", "offset": "900" } ])
Input Schema
Name | Required | Description | Default |
---|---|---|---|
method | No | CreateDoorWindows | |
params | No |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from Revit MCP Server
- active_view
- call_func
- create_cable_trays
- create_door_windows
- create_ducts
- create_family_instances
- create_floor_plan_views
- create_floors
- create_grids
- create_levels
- create_pipes
- create_rooms
- create_room_tags
- create_sheets
- create_walls
- delete_elements
- execute_commands
- find_elements
- get_commands
- get_locations
- get_selected_elements
- link_dwg_and_activate_view
- move_elements
- parameter_elements
- show_elements
- update_elements
Related Tools
- @revit-mcp/revit-mcp
- @ZedMoster/revit-mcp
- @ZedMoster/revit-mcp
- @ZedMoster/revit-mcp
- @ZedMoster/revit-mcp