dynamorevit

repository·master·Indexed 19 days ago

https://github.com/dynamods/dynamorevit

dynamorevit provides specialized nodes and tools for interacting with the Revit API to enable automated model checking, element analysis, and rule execution. It includes functionality for managing ConnectionNodes, retrieving ConnectionTypes from Revit (.rvt) files, and filtering connection nodes by analysis results, angles between beams, section profiles, shapes, and types.

Tokens
112.2K
Snippets
161
Records
918
Agent score
64%

What's inside dynamorevit

  1. Retrieve zones from a ConnectionNode

    master

    The ConnectionNode.Zones node returns a list of zones contained within each provided connection node.

    A connection node is a grouping of structural data elements (such as beams and columns) that participate in a single connection. Within these nodes, a 'zone' represents a specific portion of the structural element involved in the connection.

    There are two primary zone types:

    • end: Represents the end of a structural element where the connection actually occurs.
    • body: Represents a location on a structural element away from the end (for example, where a brace or member connects to the web of a beam).
  2. Extract an axis-aligned bounding box using Element.BoundingBox

    master

    The Element.BoundingBox method extracts an axis-aligned bounding box (AABB) geometry from a Revit element. This bounding box represents an aligned cube relative to the Dynamo X-Axis.

    Note that because it is axis-aligned, it may not accurately represent the object's specific orientation. To obtain a non-axis-aligned bounding box that better reflects the object's actual orientation, you should first extract the element's geometry and then calculate the bounding box from that geometry.

  3. Access the family document using Family.FamilyDocument

    master
    The Family.FamilyDocument property allows you to access the underlying document of a specific Revit family. This is essential when you need to extract data that is specific to the family environment rather than the project environment, such as family-specific parameters, types, or other family document data.
  4. Identify the group type of a FamilyParameter

    master
    The FamilyParameter.GroupType property is used to determine the group type of a specific parameter. In Revit, the group type dictates which category or section the parameter appears under within the property palette. This is useful for organizing or filtering parameters based on their UI placement in the Revit interface.
  5. Use View Parts Visibilities to control element parts in Revit views

    master

    The View Parts Visibilities dropdown node provides a list of Revit "View Parts Visibility" options. These options control how Revit 'Parts' (elements created via the Parts command, such as subdivided walls or floors) are displayed in a specific view.

    To apply these settings, use the View.SetPartsVisibility node. You must provide:

    1. A Revit view (e.g., a 3D View) as the view input.
    2. A value from the View Parts Visibilities node as the visibility setting.

    Available visibility modes typically include options to show the original elements, show the parts instead of the original elements, or hide the parts.

    // Conceptual Workflow:
    [View Parts Visibilities] -> [Value Input]
                                         |
    [3D View] ---------------------> [View.SetPartsVisibility]
  6. Identify the data type of a Revit parameter using Parameter.StorageType

    master

    In Revit, Parameter.StorageType is used to determine the underlying data type of a parameter's value. Knowing the storage type is essential for correctly casting or interpreting the data retrieved from a parameter.

    Supported StorageType values include:

    • None: The parameter does not store a value.
    • Integer: The parameter stores a whole number.
    • Double: The parameter stores a floating-point number.
    • String: The parameter stores text.
    • ElementId: The parameter stores a reference to another Revit element.
  7. How the Remember node works

    master

    The Remember node allows you to store a value within the Dynamo file so it can be retrieved by the graph at a later stage. A key feature of this node is its ability to recall values even when the input is null.

    Use Remember for the following purposes:

    • Preserving data between different runs of the graph.
    • Maintaining state within a single execution.
    • Referencing previously computed or extracted information without needing to re-calculate or re-extract it every time.
  8. Select a single model element by category

    master
    Select Model Element By Category is a pick selection node used to select a single element from the current document (file). The node provides a filtered selection interface where the user chooses a category (from all available subcategories) and then picks a specific element belonging to that category within the active document.
  9. Retrieve spacing rule layouts from divided path elements

    master

    The Spacing Rule Layout node is used to retrieve the current spacing rule layout from a divided path element. This layout rule determines how points are distributed along the path.

    Workflow Pattern:

    1. Input: A divided path element (e.g., a divided surface selected from the Revit model).
    2. Process: Use Spacing Rule Layout to extract the current layout rule.
    3. Modification: Combine the output with a string node (containing the parameter name, such as "Layout") to update the element's parameters (e.g., changing the layout type to FixedNumber).
    4. Output: The modified divided surface element.
  10. Use the Sheets selection node

    master
    The Sheets node allows you to select a single sheet from all available sheets in the current Revit document. The list of sheets provided by this node is automatically sorted by their sheet name parameter. This node is typically used to provide a specific sheet context for subsequent operations, such as collecting viewports or other elements placed on that specific sheet.
  11. Generate connection nodes with a specific number of zones

    master

    The SubNodesOfSize node is used to generate new connection nodes that contain a specific, exact number of zones.

    This is useful for filtering or restructuring connection data. For example, you can use this node to isolate elements that have a specific structural arrangement by only including elements that meet a minimum zone count (e.g., only including elements with three or more connection zones). The output is a collection of sublists, where each sublist represents a distinct grouping or structural arrangement from the original element.