pyRevit icon indicating copy to clipboard operation
pyRevit copied to clipboard

Color Splasher doesn't load parameters after pointing a category

Open MohamedAsli opened this issue 2 years ago • 14 comments

🐞 Describe the bug

1- The Color splasher doesn't load the parameters of the pointed category. The field stay empty. Instead it opens the window n2 2- The UI window stays on top off all OS windows and not only Revit

♻️ To Reproduce

Steps to reproduce the behavior:

  1. Run color splasher
  2. Pick a category

⏲️ Expected behavior

According to the snapshot in the release details, it should display the parameters right after picking a category in the dropdown list.

🖼 Screenshots of the issue

image

🖥️ Hardware and Software Setup (please complete the following information):

  • OS: w11
  • pyRevit Version 4.8.14
  • pyRevit Environment:
==> Registered Clones (deployed from archive/image)
==> Attachments
Unknown | Product: "Autodesk Revit 2024" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2024\pyRevit.addin"
Unknown | Product: "Autodesk Revit 2023" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2023\pyRevit.addin"
Unknown | Product: "2022.1.5" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2022\pyRevit.addin"
Unknown | Product: "2021 First Customer Ship" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2021\pyRevit.addin"
Unknown | Product: "2020.2.9" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2020\pyRevit.addin"
==> Installed Extensions
XXX
==> Default Extension Search Path
C:\Users\aslim\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
XXX
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2024 | Version: 24.1.11.26 | Build: 20230911_1230(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
Autodesk Revit 2023 | Version: 23.0.11.19 | Build: 20220503_1030(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
2022.1.5 | Version: 22.1.50.17 | Build: 20230915_1530(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
2021 First Customer Ship | Version: 21.0.0.383 | Build: 20200220_1100(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021\"
2020.2.9 | Version: 20.2.90.12 | Build: 20220517_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020\"
==> Running Revit Instances
PID: 11152 | 2020.2.9 | Version: 20.2.90.12 | Build: 20220517_1515(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2020"
==> User Environment
Microsoft Windows 10 [Version 10.0.22621]
Executing User: XXXX
Active User: XXXX
Admin Access: No
%APPDATA%: "C:\Users\aslim\AppData\Roaming"
Latest Installed .Net Framework: 4.8
Installed .Net Target Packs: v4.0 v4.5 v4.5.1 v4.5.2 v4.6 v4.6.1 v4.7 v4.7.1 v4.7.2 v4.8 v4.X
Installed .Net-Core Target Packs: v7.0.403
pyRevit CLI v4.8.14.24016+1909.ee814ee2f686d23db8bb6ff80d8bb918ff9adc99```


MohamedAsli avatar Jan 18 '24 13:01 MohamedAsli

Tried doing this in R2024 in a structural model but couldn't reproduce, however I did get an error message after selecting the following Generic Model > Cost The moment I click 'Cost' I get an error ( see screenshot and trace ) image

************** Exception Text **************
System.MissingMemberException: 'NoneType' object has no attribute 'Parameters'
   at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at IronPython.Runtime.Binding.PythonGetMemberBinder.FastPropertyGet`1.GetProperty(CallSite site, TSelfType target, CodeContext context)
   at lambda_method(Closure , Object[] , StrongBox`1[] , InterpretedFrame )
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at Microsoft.Scripting.Interpreter.DynamicInstruction`6.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at CallSite.Target(Closure , CallSite , Object , Object , ItemCheckEventArgs )
   at _Scripting_(Object[] , Object , ItemCheckEventArgs )
   at System.Windows.Forms.ItemCheckEventHandler.Invoke(Object sender, ItemCheckEventArgs e)
   at System.Windows.Forms.CheckedListBox.OnItemCheck(ItemCheckEventArgs ice)
   at System.Windows.Forms.CheckedListBox.LbnSelChange()
   at System.Windows.Forms.CheckedListBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ListBox.WndProc(Message& m)
   at System.Windows.Forms.CheckedListBox.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

sweco-beb283 avatar Jan 19 '24 06:01 sweco-beb283

@sweco-begertjanvdb and @MohamedAsli I can't reproduce, could you provide:

  • Revit Version number
  • Revit Language used
  • Model also would be helpful
  • unit system (metric or imperial)

jmcouffin avatar Jan 19 '24 10:01 jmcouffin

win11, right?

jmcouffin avatar Jan 19 '24 10:01 jmcouffin

Revit build: 24.1.10.25 20230830_0315(x64) 2024.1.1

Revit Language: English, en_US I think

Model Sorry can't provide a model, company property

Unit system: Metric

OS: Win11

sweco-beb283 avatar Jan 19 '24 10:01 sweco-beb283

tried to reproduce in win10 (only difference) to no avail also tried with generic model inplace families, worked as expected @sweco-begertjanvdb

jmcouffin avatar Jan 19 '24 10:01 jmcouffin

I tried it on my win11 machine. No luck in Reproducing used the revit structural sample @sweco-begertjanvdb maybe you could send me a model with only the generic models or one of each type of generic models for me to try to reproduce.

jmcouffin avatar Jan 19 '24 18:01 jmcouffin

same error here image

latest revit 2022 update win 10 unit system - metric revit language - english

bensaleden avatar Jan 23 '24 17:01 bensaleden

Might be a context management issue. Anyone with a pointer?

jmcouffin avatar Jan 23 '24 19:01 jmcouffin

after try/except all DataTable creation / instanciation, it seems the issue is with line https://github.com/eirannejad/pyRevit/blob/57c54be397a18b42cafd6319aa9d81a75bde8dac/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/ColorSplasher.pushbutton/script.py#L1196

no idea whatsoever what is happening. The error is inconsistent. I run the same tool with a different name, in another extension, no issue.

@sanzoghenzo would you mind having a look?

jmcouffin avatar Jan 23 '24 21:01 jmcouffin

but.. trying on my desktop (win10) no issue...

jmcouffin avatar Jan 24 '24 10:01 jmcouffin

Perhaps something with installed dotnet frameworks?

sweco-beb283 avatar Jan 24 '24 16:01 sweco-beb283

@sweco-begertjanvdb and @MohamedAsli I can't reproduce, could you provide:

  • Revit Version number
  • Revit Language used
  • Model also would be helpful
  • unit system (metric or imperial)

I can reproduce the original issue.

For me it works fine in 2024.1.0, but does not run (with the same blank popup window) in 2020.2.9, 2021.1.8 or 2023.1.1 All English. Models can't be provided, but I can replicate in the 2023 racadvancedsampleproject. All metric. Let me know anything else I can add that could help.

hamishlownz avatar Jan 29 '24 03:01 hamishlownz

same issue here with both pyrevit version of 4.814 and 4.8.15 om Revit 2024.2. But it used to work before once i tried it on 4.8.14

PAYAM2000 avatar Apr 26 '24 04:04 PAYAM2000

ok, this is interesting, I noticed that it works for some of the parameters and not others... it didnt work for "doors" and "Fire Rating" but it worked for Walls and floors, etc.

PAYAM2000 avatar Apr 26 '24 04:04 PAYAM2000

fix 2355

jmcouffin avatar Aug 16 '24 08:08 jmcouffin