Skip to content

Update Nice3point.Revit.Extensions#50

Merged
Nice3point merged 1 commit intodevelopfrom
renovate/nice3point.revit.extensions
Mar 12, 2026
Merged

Update Nice3point.Revit.Extensions#50
Nice3point merged 1 commit intodevelopfrom
renovate/nice3point.revit.extensions

Conversation

@Nice3point
Copy link
Owner

This PR contains the following updates:

Package Type Update Change
Nice3point.Revit.Extensions nuget patch 2021.5.0-preview.1.202601202021.5.0-preview.2.20260310
Nice3point.Revit.Extensions nuget patch 2022.5.0-preview.1.202601202022.5.0-preview.2.20260310
Nice3point.Revit.Extensions nuget patch 2023.5.0-preview.1.202601202023.5.0-preview.2.20260310
Nice3point.Revit.Extensions nuget patch 2024.3.0-preview.1.202601202024.3.0-preview.2.20260310
Nice3point.Revit.Extensions nuget patch 2025.2.0-preview.1.202601202025.2.0-preview.2.20260310
Nice3point.Revit.Extensions nuget patch 2026.1.0-preview.1.202601202026.1.0-preview.2.20260310
Nice3point.Revit.Extensions nuget patch 2027.0.0-preview.1.202601202027.0.0-preview.2.20260310

Release Notes

Nice3point/RevitExtensions (Nice3point.Revit.Extensions)

v2027.0.0-preview.2.20260310

Compare Source

This update focuses on improved API design through C# 14 extension methods syntax, .NET 10 support, Revit 2027 support, and ElementId overloads.

New Features

Application Extensions:

  • application.AsControlledApplication() - creates a ControlledApplication from an Application instance

UIApplication Extensions:

  • uiApplication.AsControlledApplication() - creates a UIControlledApplication from a UIApplication instance

BuiltInCategory Extensions

  • builtInCategory.ToCategory(Document document) - creates a a Revit Category object from BuiltInCategory value
  • builtInCategory.ToElementId() - creates an ElementId handle from a BuiltInCategory value

BuiltInParameter Extensions

  • builtInParameter.ToParameter(Document document) - creates a Revit Parameter object from BuiltInParameter value
  • builtInParameter.ToElementId() - creates an ElementId handle from a BuiltInParameter value

Ribbon Extensions:

  • pushButton.TryAddShortcuts(string representation) - attempts to add keyboard shortcuts, returns false if shortcuts conflict with existing commands
  • pushButton.TryAddShortcuts(params IEnumerable<string> shortcuts) - attempts to add multiple keyboard shortcuts with conflict detection

ElementId Extension Overloads

Added comprehensive ElementId overloads for all extension methods that work with element.Document and element.Id.
This allows working directly with ElementId when you don't have the Element instance.

  • DocumentValidationExtensions

    • elementId.CanBeDeleted(Document document)
  • ElementTransformUtilsExtensions

    • elementId.CanBeMirrored(Document document)
    • elementId.Copy(Document document, XYZ vector)
    • elementId.Copy(Document document, double deltaX, double deltaY, double deltaZ)
    • elementId.Mirror(Document document, Plane plane)
    • elementId.Move(Document document, double deltaX, double deltaY, double deltaZ)
    • elementId.Move(Document document, XYZ vector)
    • elementId.Rotate(Document document, Line axis, double angle)
  • FamilyUtilsExtensions

    • elementId.CanBeConvertedToFaceHostBased(Document document)
    • elementId.ConvertToFaceHostBased(Document document)
  • WorksharingUtilsExtensions

    • elementId.GetCheckoutStatus(Document document)
    • elementId.GetCheckoutStatus(Document document, out string owner)
    • elementId.GetWorksharingTooltipInfo(Document document)
    • elementId.GetModelUpdatesStatus(Document document)
  • AnalyticalToPhysicalAssociationManagerExtensions

    • elementId.IsAnalyticalElement(Document document)
    • elementId.IsPhysicalElement(Document document)
  • GlobalParametersManagerExtensions

    • elementId.MoveGlobalParameterUpOrder(Document document)
    • elementId.MoveGlobalParameterDownOrder(Document document)

Usage examples:

// Work with ElementId directly without Element instance
ElementId elementId = /* ... */;

// Validation
if (elementId.CanBeDeleted(document))
{
    document.Delete(elementId);
}

// Transformations
elementId.Copy(document, new XYZ(10, 0, 0));
elementId.Move(document, 5, 5, 0);
elementId.Mirror(document, plane);
elementId.Rotate(document, axis, angle);

// Worksharing
var status = elementId.GetCheckoutStatus(document);
var tooltipInfo = elementId.GetWorksharingTooltipInfo(document);

// Family operations
if (familyId.CanBeConvertedToFaceHostBased(document))
{
    familyId.ConvertToFaceHostBased(document);
}

// Global parameters
globalParamId.MoveGlobalParameterUpOrder(document);

// Built-in conversions
Category category = BuiltInCategory.OST_Walls.ToCategory(document);
Parameter parameter = BuiltInParameter.WALL_ATTR_ROOM_BOUNDING.ToParameter(document);

Improvements

  • Revit 2019 support by @​ZedMoster in #​13
  • SDK Update: Updated to stable .NET 10 SDK
  • Documentation: Updated parameter descriptions and variable names to align with C# 14 syntax
  • Build System: Migration from Nuke to ModularPipilines
  • API Consistency: Renamed Can* methods to follow Revit API passive voice pattern (CanBe*)
  • Reflexion: API covered with UnsafeAccessor attribute when possible in .NET 8+ builds

Breaking changes

The following boolean methods have been converted to properties for improved syntax and consistency with modern C# conventions:

  • IsAnalyticalElement: Changed from method to property
  • IsPhysicalElement: Changed from method to property
  • AreGlobalParametersAllowed: Changed from method to property
  • IsBuiltInParameter (ForgeTypeId): Changed from method to property
  • IsBuiltInParameter (Parameter): Changed from method to property
  • IsBuiltInGroup: Changed from method to property
  • HasOpenConnector: Changed from method to property
  • IsAllowedForSolidCut: Changed from method to property
  • IsElementFromAppropriateContext: Changed from method to property
  • IsValidForTessellation: Changed from method to property
  • IsSpec: Changed from method to property
  • IsValidDataType: Changed from method to property
  • IsSymbol: Changed from method to property
  • IsUnit: Changed from method to property
  • IsMeasurableSpec: Changed from method to property

Renamed Methods (Revit API naming consistency):

  • CanDeleteElement: Renamed to CanBeDeleted (passive voice pattern)
  • CanMirrorElement: Renamed to CanBeMirrored (passive voice pattern)
  • CanMirrorElements: Renamed to CanBeMirrored (passive voice pattern)
  • CanConvertToFaceHostBased: Renamed to CanBeConvertedToFaceHostBased (passive voice pattern)

Namespace change for UI Extensions:

Ribbon and UIApplication extensions have been moved to a dedicated namespace to support proper type resolution in no-UI scenarios:

  • Nice3point.Revit.ExtensionsNice3point.Revit.Extensions.UI

Affected classes: RibbonExtensions, ContextMenuExtensions, UiApplicationExtensions.

Obsolete methods with auto-conversion:

Old method names are marked as [Obsolete] with [CodeTemplate] attributes for automatic IDE conversion to new names.

Migration examples:

// Properties (old → new, auto-conversion is not available because of the same name)
if (element.IsAnalyticalElement())  // Old
if (element.IsAnalyticalElement)    // New

// Renamed methods (old → new, auto-conversion available)
element.CanDeleteElement();              // Old, IDE suggests: element.CanBeDeleted()
element.CanMirrorElement();              // Old, IDE suggests: element.CanBeMirrored()
family.CanConvertToFaceHostBased();      // Old, IDE suggests: family.CanBeConvertedToFaceHostBased()

Full changelog: Nice3point/RevitExtensions@2027.0.0-preview.1.20260120...2027.0.0-preview.2.20260310


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@Nice3point Nice3point added the maintenance ⚙️ Some regular maintenance updates label Mar 11, 2026
Copilot AI review requested due to automatic review settings March 11, 2026 02:07
@Nice3point Nice3point added the maintenance ⚙️ Some regular maintenance updates label Mar 11, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the centrally-managed Nice3point.Revit.Extensions package versions (per Revit year) to the latest preview.2 builds, aligning the toolkit’s dependency set with the newer RevitExtensions releases.

Changes:

  • Bump Nice3point.Revit.Extensions pinned versions for Revit 2021–2027 from *-preview.1.20260120 to *-preview.2.20260310.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Nice3point Nice3point merged commit 60bed56 into develop Mar 12, 2026
5 checks passed
@Nice3point Nice3point deleted the renovate/nice3point.revit.extensions branch March 12, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance ⚙️ Some regular maintenance updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants