Skip to content

Commit

Permalink
Update ParameterId.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
kike-garbo authored May 20, 2024
1 parent 01f56b0 commit 4693cc4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/RhinoInside.Revit.External/DB/Schemas/ParameterId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,22 @@ public partial class ParameterId : DataType
{
public static new ParameterId Empty { get; } = new ParameterId();

public override string LocalizedLabel => IsNullOrEmpty(this) ? string.Empty :
public override string LocalizedLabel
{
get
{
try
{
return IsNullOrEmpty(this) ? string.Empty :
#if REVIT_2022
Autodesk.Revit.DB.LabelUtils.GetLabelForBuiltInParameter(this);
Autodesk.Revit.DB.LabelUtils.GetLabelForBuiltInParameter(this);
#else
Autodesk.Revit.DB.LabelUtils.GetLabelFor((Autodesk.Revit.DB.BuiltInParameter) this);
Autodesk.Revit.DB.LabelUtils.GetLabelFor((Autodesk.Revit.DB.BuiltInParameter) this);
#endif
}
catch { return string.Empty; }
}
}

public ParameterId() { }
public ParameterId(string id) : base(id)
Expand Down

0 comments on commit 4693cc4

Please sign in to comment.