Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

FirstOption Revit Command Library

The FirstOption Revit MCP writes this file. Do not edit it by hand. Each command is a pyRevit button in FirstOptionLibrary.extension and an MCP tool target (library_run).

Command Language Description Runs Tested in
aligntags_crossing_demo_sheet csharp Builds a comparison sheet for the AlignTags D3 (down-left) + Y-order sort problem. It makes 6 floor plan views (1:200): tags on a column of walls and tags on scattered walls, each aligned 3 ways: 1 OLD (OrderPointsFromTopToBot false), 2 FIXED (true), 3 PROPOSED (OrderByLeaderLine). Red detail circles mark every leader crossing, and each view name shows the crossing count. The views go on a new sheet in a 3 x 2 grid (rows OLD/FIXED/PROPOSED, columns Column/Scattered). 1 2026
aligntags_helper_unit_tests csharp Unit tests for the AlignTags add-in helpers, with the code copied from Helper.cs, TagsSelectionFilter.cs, Command.cs and AlignTagsViewModel.cs (R2022+ branch): CountLines, both MovePoint overloads, RotateDirectionAroundAxis (0/90/180/270 deg give right/up/left/down), GetLeaderLine angle, GetElbowPoint (point on both lines, parallel gives null, far head), GetTagTextHeight against the real tag height with the leader hidden, TagsSelectionFilter.AllowElement, the plan/section view gate, and the SliderValue rounding. Read-only: the tag height check rolls back. Prints PASS/FAIL per check. 1 2026
aligntags_leader_crossing_test csharp Runs the AlignTags align logic (copied from AlignTagsViewModel.AlignCommand and Helper.cs) on the tags of one or more plan/section views, for directions D1-D4, several slider angles and three tag layouts (row, column, scattered), and counts leader crossings (leader vs leader, and leader vs the horizontal elbow-to-head part). It also checks that the heads stack at the spacing and that the elbow angle is exact. The picked point is replaced by a target past all elbows. Every case rolls back, so the model does not change. Compare sort methods: leader_line (new OrderByLeaderLine), xy_old (original X/Y sort), xy_fixed (X/Y sort with the D3 Y-order fix). 3 2026
aligntags_test_env_setup csharp Builds a test model for the AlignTags add-in: 6 short basic walls (2 m long, 3 m high), staggered in X and scattered in Y, a floor plan view " Plan" (1:100) and a section view " Section" (1:100) that looks at all the walls, and one wall tag on each wall in both views (12 tags). Sets the wall type Type Mark to W1 when it is empty so that the tags show text. Returns the wall, tag and view ids. 1 2026
align_tags_leader_line csharp Aligns IndependentTags in the active plan or section view the same way as the AlignTags add-in, with the new crossing-free sort. It sets the leaders to free end, sorts the tags by where each leader line cuts a horizontal line (OrderByLeaderLine), stacks the tag heads in one column from a target point (plan: along Y, section: along Z), and puts each elbow so the leader has the chosen angle. Directions: 1 up-left (180-angle), 2 up-right (angle), 3 down-left (180+angle), 4 down-right (360-angle). Without a target point it puts the head column past all elbows, so no leaders cross. 1 2026
annotate_plan_no_overlap ironpython Annotates one floor plan view so that no annotation overlaps another. (1) Grid dimensions: a chain string and an overall string for the vertical grids (above the building) and for the horizontal grids (left of the building). Texts slide along the line to keep clear of section lines, section heads, elevation marks and grid bubbles. (2) Room tags: one tag per untagged room, placed at the middle of the room (solid centroid), moved the smallest distance needed to keep clear of walls, grid lines, section lines, detail lines and other annotations. (3) Internal dimensions: one width and one height dimension per room, wall face to wall face, using only walls that the plan cuts (a room line from walls above the cut is matched to the cut wall face up to 1.1 ft away). Slanted walls use a wall corner edge. Texts slide along the line. (4) Door tags: existing door tags are moved next to their door, on the larger-room side, clear of walls, grid lines and other annotations. (5) Final check lists any overlap from the real text positions. Default is a dry run that rolls back. 0
build_dosatron_d14mz2_lod400 ironpython Builds the Dosatron D14MZ2 proportional dosing injector as a fully constrained LOD 400 Pipe Accessories family: 31 named reference planes with labelled dimensions, 124 parameters (39 shared: identity, connection, performance, maintenance), 2 pipe connectors (Fitting, In/Out, size driven by Pipe_Connection_Size), six nested families (main housing, dosing assembly, suction hose, suction filter, wall bracket, connection detail) aligned to the planes and driven by host parameters, material parameters, Show_* visibility, clearance and service-zone solids, coarse/medium/fine detail levels, symbolic flow arrows. Writes the host .rfa, the nested .rfa files and the shared parameter file. Run with use_transaction=false. 0
create_dosatron_d14mz2_family ironpython Builds the Dosatron D14MZ2 water-powered proportional dosing injector as a Mechanical Equipment family (.rfa, LOD 100-400): motor bell with ribs and top cap, lower housing with flow arrow and bracket tabs, 3/4 in NPT inlet/outlet with thread rings and two pipe connectors (Other pipe, In/Out), grey adjustment nut, locking ring, scale ring with ticks, black dosing body, suction assembly with parametric tube length, stainless wall bracket, labels, 6 materials, shared parameters file, 52 parameters, LOD and visibility controls, reference planes, and a type catalog. Saves and closes the family. Run with use_transaction=false. 0
create_hunter_ibv_valve_family ironpython Creates a Pipe Accessory family (.rfa) of a Hunter IBV brass globe valve (default IBV-101-G-B-FS, 1 in / 25 mm BSP): body, BSP ends, bonnet, flow control handle, solenoid, materials, 2 pipe connectors, manufacturer/model/URL data. Saves and closes the family file; it does not load it. Run with use_transaction=false. 0
create_sheet ironpython Create an empty sheet with a given number, name and title block type. If the number exists, it adds -1, -2 and so on. 0
create_sheets_from_drawing_index ironpython Create many sheets from a list of [number, name] pairs with one title block type. It skips numbers that exist. It also creates a sheet list schedule (SHEET NUMBER, SHEET NAME, sorted by number, filter: number less than 'A') and places it on one sheet. 0
create_sheets_rename_on_conflict ironpython Create one new sheet for each [number, name] pair with one title block type. When a sheet number exists, the new sheet gets the number with a suffix (-1, -2, ...), so every row always makes a new sheet. 1 2026
load_and_place_family ironpython Loads a .rfa family into the open project (or reuses it when it is already loaded), activates its first type, and places one instance at the origin on the lowest level with a height offset. Prints category, type, bounding box and MEP connectors. 0
room_finish_walls_by_name ironpython Add interior finish walls of one wall type inside every room whose name contains a keyword (accents ignored, 'cafe' matches 'Café'). One finish wall per wall boundary segment, placed on the room side, room height, not room-bounding, joined to the host wall so doors cut it. Skips curtain walls, columns, and segments under 30 mm. Then deletes finish walls that cover a curtain wall embedded in the host wall. 0
set_door_comments_to_room_name ironpython Write the room name into the Comments parameter of every door. It uses the To Room, and the From Room when there is no To Room. Doors with no room stay unchanged. Existing comments are replaced. 0
set_door_type_by_room_name ironpython Find all doors whose From Room or To Room name contains a keyword (for example 'stair'), change them to one door type, and set the Type Mark of that type. It skips curtain wall doors, because a wall door type cannot replace them. 1 2026
verify_dosatron_d14mz2_lod400 ironpython Tests DOSATRON_D14MZ2_LOD400.rfa (or a family with the same parameter names) in a new clean metric plumbing project: loads and places it, lists warnings, connectors, extents per detail level, toggles all Show_* parameters, flexes hose length, inlet-to-outlet length and pipe connection size, connects two Domestic Cold Water pipes, exports fine and medium shaded 3D PNG renders. Rolls back every change and closes the project unsaved. Run with use_transaction=false. 0
verify_mep_family_in_test_project ironpython Tests a saved .rfa in a new temporary project (Plumbing metric template): loads the type catalog type, places one instance, lists warnings and pipe connectors, flexes the Dosatron-style parameters (visibility, LOD, suction tube length, connection diameter) and measures real geometry extents, connects two pipes, and exports a shaded 3D PNG render. Every test change is rolled back and the project closes without saving. Run with use_transaction=false. 0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages