Skip to content

Commit 4b20919

Browse files
committed
[Documentation] Update variable names and comments
1 parent 000fe47 commit 4b20919

11 files changed

Lines changed: 182 additions & 182 deletions

source/Nice3point.Revit.Extensions/GeometryExtensions.cs

Lines changed: 85 additions & 85 deletions
Large diffs are not rendered by default.

source/Nice3point.Revit.Extensions/UtilsExtensions/DocumentValidationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Nice3point.Revit.Extensions;
88
[PublicAPI]
99
public static class DocumentValidationExtensions
1010
{
11-
/// <param name="element">The element to check.</param>
11+
/// <param name="element">The element to validate.</param>
1212
extension(Element element)
1313
{
1414
/// <summary>Indicates if an element can be deleted.</summary>

source/Nice3point.Revit.Extensions/UtilsExtensions/ElementTransformUtilsExtensions.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Nice3point.Revit.Extensions;
88
[PublicAPI]
99
public static class ElementTransformUtilsExtensions
1010
{
11-
/// <param name="element">The source element</param>
11+
/// <param name="element">The element to transform.</param>
1212
extension(Element element)
1313
{
1414
/// <summary>Determines whether element can be mirrored</summary>
@@ -96,20 +96,20 @@ public ICollection<ElementId> Copy(double deltaX, double deltaY, double deltaZ)
9696
}
9797
}
9898

99-
/// <param name="view">The source view</param>
99+
/// <param name="view">The view to transform.</param>
100100
extension(View view)
101101
{
102102
/// <summary>
103-
/// Returns a transformation that is applied to elements when copying from one view to another view.
103+
/// Returns a transformation that is applied to elements when copying from this view to another view.
104104
/// </summary>
105105
/// <remarks>
106-
/// Both source and destination views must be 2D graphics views capable of drawing details and view-specific elements (floor and ceiling plans, elevations, sections, drafting views.)
107-
/// The result is a transformation needed to copy an element from drawing plane of the source view to the drawing plane of the destination view.
108-
/// The destination view can be in the same document as the source view.
109-
/// The destination view can be the same as the source view.
106+
/// Both this view and the destination view must be 2D graphics views capable of drawing details and view-specific elements (floor and ceiling plans, elevations, sections, drafting views.)
107+
/// The result is a transformation needed to copy an element from the drawing plane of this view to the drawing plane of the destination view.
108+
/// The destination view can be in the same document as this view.
109+
/// The destination view can be the same as this view.
110110
/// </remarks>
111111
/// <param name="destinationView">The destination view</param>
112-
/// <returns>The transformation from source view to destination view.</returns>
112+
/// <returns>The transformation from this view to the destination view.</returns>
113113
/// <exception cref="T:Autodesk.Revit.Exceptions.ArgumentException">
114114
/// The specified view cannot be used as a source or destination for copying elements between two views.
115115
/// </exception>
@@ -120,16 +120,16 @@ public Transform GetTransformFromViewToView(View destinationView)
120120
}
121121
}
122122

123-
/// <param name="elementIds">The elements identified by id.</param>
124-
extension(ICollection<ElementId> elementIds)
123+
/// <param name="elements">The element ids to transform.</param>
124+
extension(ICollection<ElementId> elements)
125125
{
126126
/// <summary>Determines whether elements can be mirrored.</summary>
127127
/// <param name="document">The document where the elements reside.</param>
128128
/// <returns>True if the elements can be mirrored.</returns>
129129
[Pure]
130130
public bool CanMirrorElements(Document document)
131131
{
132-
return ElementTransformUtils.CanMirrorElements(document, elementIds);
132+
return ElementTransformUtils.CanMirrorElements(document, elements);
133133
}
134134

135135
/// <summary>
@@ -158,7 +158,7 @@ public bool CanMirrorElements(Document document)
158158
/// </exception>
159159
public ICollection<ElementId> CopyElements(Document document, XYZ translation)
160160
{
161-
return ElementTransformUtils.CopyElements(document, elementIds, translation);
161+
return ElementTransformUtils.CopyElements(document, elements, translation);
162162
}
163163

164164
/// <summary>Copies a set of elements from source document to destination document.</summary>
@@ -201,7 +201,7 @@ public ICollection<ElementId> CopyElements(Document sourceDocument,
201201
Transform transform,
202202
CopyPasteOptions options)
203203
{
204-
return ElementTransformUtils.CopyElements(sourceDocument, elementIds, destinationDocument, transform, options);
204+
return ElementTransformUtils.CopyElements(sourceDocument, elements, destinationDocument, transform, options);
205205
}
206206

207207
/// <summary>Copies a set of elements from source document to destination document.</summary>
@@ -235,7 +235,7 @@ public ICollection<ElementId> CopyElements(Document sourceDocument,
235235
/// </exception>
236236
public ICollection<ElementId> CopyElements(Document sourceDocument, Document destinationDocument)
237237
{
238-
return ElementTransformUtils.CopyElements(sourceDocument, elementIds, destinationDocument, null, null);
238+
return ElementTransformUtils.CopyElements(sourceDocument, elements, destinationDocument, null, null);
239239
}
240240

241241
/// <summary>Copies a set of elements from source view to destination view.</summary>
@@ -291,7 +291,7 @@ public ICollection<ElementId> CopyElements(View sourceView,
291291
Transform additionalTransform,
292292
CopyPasteOptions options)
293293
{
294-
return ElementTransformUtils.CopyElements(sourceView, elementIds, destinationView, additionalTransform, options);
294+
return ElementTransformUtils.CopyElements(sourceView, elements, destinationView, additionalTransform, options);
295295
}
296296

297297
/// <summary>Copies a set of elements from source view to destination view.</summary>
@@ -335,7 +335,7 @@ public ICollection<ElementId> CopyElements(View sourceView,
335335
/// </exception>
336336
public ICollection<ElementId> CopyElements(View sourceView, View destinationView)
337337
{
338-
return ElementTransformUtils.CopyElements(sourceView, elementIds, destinationView, null, null);
338+
return ElementTransformUtils.CopyElements(sourceView, elements, destinationView, null, null);
339339
}
340340

341341
/// <summary>Mirrors a set of elements about a given plane.</summary>
@@ -367,7 +367,7 @@ public ICollection<ElementId> CopyElements(View sourceView, View destinationView
367367
/// </exception>
368368
public ICollection<ElementId> MirrorElements(Document document, Plane plane, bool mirrorCopies)
369369
{
370-
return ElementTransformUtils.MirrorElements(document, elementIds, plane, mirrorCopies);
370+
return ElementTransformUtils.MirrorElements(document, elements, plane, mirrorCopies);
371371
}
372372

373373
/// <summary>Moves a set of elements by a given transformation.</summary>
@@ -385,8 +385,8 @@ public ICollection<ElementId> MirrorElements(Document document, Plane plane, boo
385385
/// </exception>
386386
public ICollection<ElementId> MoveElements(Document document, XYZ translation)
387387
{
388-
ElementTransformUtils.MoveElements(document, elementIds, translation);
389-
return elementIds;
388+
ElementTransformUtils.MoveElements(document, elements, translation);
389+
return elements;
390390
}
391391

392392
/// <summary>Rotates a set of elements about the given axis and angle.</summary>
@@ -400,8 +400,8 @@ public ICollection<ElementId> MoveElements(Document document, XYZ translation)
400400
/// </exception>
401401
public ICollection<ElementId> RotateElements(Document document, Line axis, double angle)
402402
{
403-
ElementTransformUtils.RotateElements(document, elementIds, axis, angle);
404-
return elementIds;
403+
ElementTransformUtils.RotateElements(document, elements, axis, angle);
404+
return elements;
405405
}
406406
}
407407
}

source/Nice3point.Revit.Extensions/UtilsExtensions/HostObjectUtilsExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Nice3point.Revit.Extensions;
88
[PublicAPI]
99
public static class HostObjectUtilsExtensions
1010
{
11-
/// <param name="host">The host object</param>
11+
/// <param name="host">The host object.</param>
1212
extension(HostObject host)
1313
{
1414
/// <summary>Returns the bottom faces for this host object</summary>

source/Nice3point.Revit.Extensions/UtilsExtensions/JoinGeometryUtilsExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Nice3point.Revit.Extensions;
88
[PublicAPI]
99
public static class JoinGeometryUtilsExtensions
1010
{
11-
/// <param name="element">The source element</param>
11+
/// <param name="element">The element.</param>
1212
extension(Element element)
1313
{
1414
/// <summary>
@@ -22,7 +22,7 @@ public static class JoinGeometryUtilsExtensions
2222
/// The second element to be joined. This element must not be joined to the first element
2323
/// </param>
2424
/// <exception cref="T:Autodesk.Revit.Exceptions.ArgumentException">
25-
/// The element secondElement was not found in the source document<br />
25+
/// The element secondElement was not found in the document<br />
2626
/// The elements are already joined<br />
2727
/// The elements cannot be joined<br />
2828
/// </exception>
@@ -42,7 +42,7 @@ public void JoinGeometry(Element secondElement)
4242
/// The second element to be unjoined. This element must be joined to the fist element
4343
/// </param>
4444
/// <exception cref="T:Autodesk.Revit.Exceptions.ArgumentException">
45-
/// The element secondElement was not found in the source document<br />
45+
/// The element secondElement was not found in the document<br />
4646
/// The elements are not joined<br />
4747
/// The elements cannot be unjoined
4848
/// </exception>
@@ -61,7 +61,7 @@ public void UnjoinGeometry(Element secondElement)
6161
/// <param name="secondElement">The second element</param>
6262
/// <returns>True if the two elements are joined</returns>
6363
/// <exception cref="T:Autodesk.Revit.Exceptions.ArgumentException">
64-
/// The element secondElement was not found in the source document
64+
/// The element secondElement was not found in the document
6565
/// </exception>
6666
[Pure]
6767
public bool AreElementsJoined(Element secondElement)
@@ -91,7 +91,7 @@ public ICollection<ElementId> GetJoinedElements()
9191
/// The second element. This element must be joined to the first element
9292
/// </param>
9393
/// <exception cref="T:Autodesk.Revit.Exceptions.ArgumentException">
94-
/// The element secondElement was not found in the source document<br />
94+
/// The element secondElement was not found in the document<br />
9595
/// The elements are not joined<br />
9696
/// The elements cannot be joined
9797
/// </exception>
@@ -104,15 +104,15 @@ public void SwitchJoinOrder(Element secondElement)
104104
}
105105

106106
/// <summary>
107-
/// Determines whether the first of two joined elements is cutting the second element
107+
/// Determines whether this element is cutting the second element in a join
108108
/// </summary>
109109
/// <remarks>This functionality is not available for family documents</remarks>
110110
/// <param name="secondElement">The second element</param>
111111
/// <returns>
112-
/// True if the secondElement is cut by the element, false if the secondElement is cut by the element
112+
/// True if this element is cutting the secondElement, false if the secondElement is cutting this element
113113
/// </returns>
114114
/// <exception cref="T:Autodesk.Revit.Exceptions.ArgumentException">
115-
/// The element secondElement was not found in the source document<br />
115+
/// The element secondElement was not found in the document<br />
116116
/// The elements are not joined
117117
/// </exception>
118118
[Pure]

source/Nice3point.Revit.Extensions/UtilsExtensions/LabelUtilsExtensions.cs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Autodesk.Revit.ApplicationServices;
1+
using Autodesk.Revit.ApplicationServices;
22

33
// ReSharper disable once CheckNamespace
44
namespace Nice3point.Revit.Extensions;
@@ -10,8 +10,8 @@ namespace Nice3point.Revit.Extensions;
1010
public static class LabelUtilsExtensions
1111
{
1212
#if REVIT2021_OR_GREATER
13-
/// <param name="forgeTypeId">Unique identifier</param>
14-
extension(ForgeTypeId forgeTypeId)
13+
/// <param name="typeId">Unique identifier</param>
14+
extension(ForgeTypeId typeId)
1515
{
1616
/// <summary>
1717
/// Gets the user-visible name for a spec
@@ -26,7 +26,7 @@ public static class LabelUtilsExtensions
2626
[Pure]
2727
public string ToSpecLabel()
2828
{
29-
return LabelUtils.GetLabelForSpec(forgeTypeId);
29+
return LabelUtils.GetLabelForSpec(typeId);
3030
}
3131

3232
/// <summary>
@@ -39,7 +39,7 @@ public string ToSpecLabel()
3939
[Pure]
4040
public string ToSymbolLabel()
4141
{
42-
return LabelUtils.GetLabelForSymbol(forgeTypeId);
42+
return LabelUtils.GetLabelForSymbol(typeId);
4343
}
4444

4545
/// <summary>
@@ -52,7 +52,7 @@ public string ToSymbolLabel()
5252
[Pure]
5353
public string ToUnitLabel()
5454
{
55-
return LabelUtils.GetLabelForUnit(forgeTypeId);
55+
return LabelUtils.GetLabelForUnit(typeId);
5656
}
5757

5858
#if REVIT2022_OR_GREATER
@@ -66,7 +66,7 @@ public string ToUnitLabel()
6666
[Pure]
6767
public string ToDisciplineLabel()
6868
{
69-
return LabelUtils.GetLabelForDiscipline(forgeTypeId);
69+
return LabelUtils.GetLabelForDiscipline(typeId);
7070
}
7171

7272
/// <summary>
@@ -79,14 +79,14 @@ public string ToDisciplineLabel()
7979
[Pure]
8080
public string ToLabel()
8181
{
82-
if (forgeTypeId.Empty()) return string.Empty;
82+
if (typeId.Empty()) return string.Empty;
8383

84-
if (ParameterUtils.IsBuiltInParameter(forgeTypeId)) return LabelUtils.GetLabelForBuiltInParameter(forgeTypeId);
85-
if (ParameterUtils.IsBuiltInGroup(forgeTypeId)) return LabelUtils.GetLabelForGroup(forgeTypeId);
86-
if (UnitUtils.IsUnit(forgeTypeId)) return LabelUtils.GetLabelForUnit(forgeTypeId);
87-
if (UnitUtils.IsSymbol(forgeTypeId)) return LabelUtils.GetLabelForSymbol(forgeTypeId);
88-
if (SpecUtils.IsSpec(forgeTypeId)) return LabelUtils.GetLabelForSpec(forgeTypeId);
89-
return LabelUtils.GetLabelForDiscipline(forgeTypeId);
84+
if (ParameterUtils.IsBuiltInParameter(typeId)) return LabelUtils.GetLabelForBuiltInParameter(typeId);
85+
if (ParameterUtils.IsBuiltInGroup(typeId)) return LabelUtils.GetLabelForGroup(typeId);
86+
if (UnitUtils.IsUnit(typeId)) return LabelUtils.GetLabelForUnit(typeId);
87+
if (UnitUtils.IsSymbol(typeId)) return LabelUtils.GetLabelForSymbol(typeId);
88+
if (SpecUtils.IsSpec(typeId)) return LabelUtils.GetLabelForSpec(typeId);
89+
return LabelUtils.GetLabelForDiscipline(typeId);
9090
}
9191

9292
/// <summary>
@@ -98,7 +98,7 @@ public string ToLabel()
9898
[Pure]
9999
public string ToGroupLabel()
100100
{
101-
return LabelUtils.GetLabelForGroup(forgeTypeId);
101+
return LabelUtils.GetLabelForGroup(typeId);
102102
}
103103

104104
/// <summary>
@@ -111,14 +111,14 @@ public string ToGroupLabel()
111111
[Pure]
112112
public string ToParameterLabel()
113113
{
114-
return LabelUtils.GetLabelForBuiltInParameter(forgeTypeId);
114+
return LabelUtils.GetLabelForBuiltInParameter(typeId);
115115
}
116116
#endif
117117
}
118118
#endif
119119

120-
/// <param name="builtInParameter">The builtin parameter</param>
121-
extension(BuiltInParameter builtInParameter)
120+
/// <param name="parameter">The builtin parameter</param>
121+
extension(BuiltInParameter parameter)
122122
{
123123
/// <summary>
124124
/// Gets the user-visible name for a BuiltInParameter
@@ -130,7 +130,7 @@ public string ToParameterLabel()
130130
[Pure]
131131
public string ToLabel()
132132
{
133-
return LabelUtils.GetLabelFor(builtInParameter);
133+
return LabelUtils.GetLabelFor(parameter);
134134
}
135135

136136
/// <summary>
@@ -147,12 +147,12 @@ public string ToLabel()
147147
[Pure]
148148
public string ToLabel(LanguageType language)
149149
{
150-
return LabelUtils.GetLabelFor(builtInParameter, language);
150+
return LabelUtils.GetLabelFor(parameter, language);
151151
}
152152
}
153153

154-
/// <param name="builtInCategory">The builtin category</param>
155-
extension(BuiltInCategory builtInCategory)
154+
/// <param name="category">The builtin category</param>
155+
extension(BuiltInCategory category)
156156
{
157157
/// <summary>
158158
/// Gets the user-visible name for a BuiltInCategory
@@ -164,25 +164,25 @@ public string ToLabel(LanguageType language)
164164
[Pure]
165165
public string ToLabel()
166166
{
167-
return LabelUtils.GetLabelFor(builtInCategory);
167+
return LabelUtils.GetLabelFor(category);
168168
}
169169
}
170170

171171
#if !REVIT2025_OR_GREATER
172-
/// <param name="builtInParameterGroup">The builtin parameter group</param>
173-
extension(BuiltInParameterGroup builtInParameterGroup)
172+
/// <param name="parameterGroup">The builtin parameter group</param>
173+
extension(BuiltInParameterGroup parameterGroup)
174174
{
175175
/// <summary>
176176
/// Gets the user-visible name for a BuiltInParameterGroup
177177
/// </summary>
178178
/// <remarks>The name is obtained in the current Revit language</remarks>
179179
[Pure]
180180
#if REVIT2024
181-
[Obsolete("This method is deprecated in Revit 2024 and may be removed in a future version of Revit. Please use the `GetLabelForGroup(ForgeTypeId)` method instead.")]
181+
[Obsolete("This method is deprecated in Revit 2024 and may be removed in a future version of Revit. Please use the `GetLabelForGroup(typeId)` method instead.")]
182182
#endif
183183
public string ToLabel()
184184
{
185-
return LabelUtils.GetLabelFor(builtInParameterGroup);
185+
return LabelUtils.GetLabelFor(parameterGroup);
186186
}
187187
}
188188

0 commit comments

Comments
 (0)