create_line_based_element
Create a wall, beam, or pipe between two points in Revit by specifying start and end coordinates. Choose element type, level, and dimensions for accurate modeling.
Instructions
Create a wall, structural beam, or pipe running between two points.
ALL LENGTHS ARE IN DECIMAL FEET - this is the Revit API's internal unit and is unaffected by the project's display units. To work in millimetres, divide by 304.8 before calling (3000mm -> 9.843).
Returns the new element's id, name and category.
Use list_levels to see valid level_name values, and list_families for beam types. When level_name is omitted the lowest level is used; when type_name is omitted the first available type is used. If a name does not match, the error lists what is available - read that rather than guessing again.
Does NOT create ducts, cable trays, curved walls, or anything that needs a non-straight curve. Use execute_revit_code for those.
Args: element_kind: One of "wall", "beam", "pipe". start_x, start_y, start_z: Start point, in feet. end_x, end_y, end_z: End point, in feet. level_name: Host level. Defaults to the lowest level. type_name: Wall/beam/pipe type name. Defaults to the first found. height: Wall height in feet. Walls only, ignored otherwise. offset: Base offset from the level, in feet. Walls only. structural: Mark the wall as structural. Walls only. diameter: Pipe diameter in feet. Pipes only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_x | Yes | ||
| end_y | Yes | ||
| end_z | No | ||
| height | No | ||
| offset | No | ||
| start_x | Yes | ||
| start_y | Yes | ||
| start_z | No | ||
| diameter | No | ||
| type_name | No | ||
| level_name | No | ||
| structural | No | ||
| element_kind | Yes |