pi-revit 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ Format follows [Keep a Changelog](https://keepachangelog.com/); version headers
7
7
  Every published version gets an entry with **Added** / **Changed** / **Fixed** sections
8
8
  describing what the user will notice — not internal refactors.
9
9
 
10
+ ## [0.2.15] - 2026-08-21
11
+
12
+ ### Fixed
13
+ - `set_parameters`: the "parameter not found" error now mentions that display names are
14
+ localized and points to the language-independent BuiltInParameter enum name — the same
15
+ guidance `get_element_details` and `get_elements` already give. Previously it only
16
+ suggested the type-parameter cause, which sent the caller down the wrong path in
17
+ non-English UIs.
18
+ - `get_elements`: the "filter parameter not found on any probed element" warning now
19
+ appears only when the query returned zero matches — that is where it distinguishes
20
+ "unknown parameter name" from "no matching elements". Next to real matches it was noise
21
+ (an unscoped query's probe window can simply miss the elements that carry the parameter).
22
+
23
+ Requires redeploying the Revit add-in (`scripts\deploy.ps1` with Revit closed, then
24
+ restart Revit).
25
+
10
26
  ## [0.2.14] - 2026-08-21
11
27
 
12
28
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-revit",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "Native Pi connector for Autodesk Revit. Run npx.cmd -y pi-revit for the full Windows install.",
5
5
  "author": "Ahmad Altahlawi",
6
6
  "license": "MIT",
@@ -147,7 +147,10 @@ namespace RevitBridge.Tools
147
147
  string scope = DescribeScope(categoryInput, classInput, inActiveView);
148
148
 
149
149
  if (countOnly && postPredicate is null)
150
- return CountResult(scope, CreateCollector().GetElementCount(), filterWarnings);
150
+ {
151
+ int quickCount = CreateCollector().GetElementCount();
152
+ return CountResult(scope, quickCount, quickCount > 0 ? Array.Empty<string>() : filterWarnings);
153
+ }
151
154
 
152
155
  var rows = countOnly ? null : new List<Dictionary<string, object?>>(Math.Min(limit, 256));
153
156
  int total = 0;
@@ -160,6 +163,12 @@ namespace RevitBridge.Tools
160
163
  total++;
161
164
  }
162
165
 
166
+ // A found match proves the query worked: the not-found-on-probes warning is
167
+ // load-bearing only next to a zero, where it distinguishes 'unknown parameter
168
+ // name' from 'no matching elements'. Beside real matches it is just noise.
169
+ if (total > 0)
170
+ filterWarnings = Array.Empty<string>();
171
+
163
172
  if (rows is null)
164
173
  return CountResult(scope, total, filterWarnings);
165
174
 
@@ -156,7 +156,7 @@ namespace RevitBridge.Tools
156
156
  {
157
157
  if (nameTarget)
158
158
  return SetElementName(element, update);
159
- throw new InvalidOperationException($"Parameter '{update.ParameterInput}' not found on element {update.ElementId} ('{element.Name}'). Type parameters live on the element type — pass its id instead.");
159
+ throw new InvalidOperationException($"Parameter '{update.ParameterInput}' not found on element {update.ElementId} ('{element.Name}'). Display names are localized in non-English Revit UIs — prefer the language-independent BuiltInParameter enum name (e.g. ALL_MODEL_INSTANCE_COMMENTS; get_element_details reports each parameter's builtInParameter). Type parameters live on the element type — pass the type's id instead.");
160
160
  }
161
161
 
162
162
  if (parameter.IsReadOnly)