architecture-building-systems / revitpythonshell

An IronPython scripting environment for Autodesk Revit and Vasari
MIT License
492 stars 112 forks source link

"Value cannot be null. Parameter name: bitmapStream" #96

Closed ghkchan closed 2 years ago

ghkchan commented 4 years ago

Hi all, I am trying to get my feet wet on using python in Revit and have limited experience in programming. I managed to install RPS in my computer and can see the add in tab. but once I configure the search path to: C:\Users\GHchan\AppData\Roaming\RevitPythonShell2019 and restart revit, this is the warning message I get, and the addin also dissappear. I tried to do some research myself but could not find the solution. Hope someone can give me some advice here. Thanks in advance!

image

HarleyT commented 4 years ago

Hey,

I'm in the same situation, only just starting out, and came across the same issue. Not sure if you've solved this yourself but since this is open i'll post my 'fix' and hopefully it helps you.

I went into the file under C:\Users\username\AppData\Roaming\RevitPythonShell2019\RevitPythonShell.xml and just deleted the lines between the code <Commands> </Commands>. Restarted Revit and it runs normally. I don't know the reason behind why adding in the search paths gives this error, but for now i'm just not going to use it.

Hopefully that helps, see attached screenshot for 'final' file where username is your login name.

RevitPythonShell

ghkchan commented 4 years ago

Hey,

I'm in the same situation, only just starting out, and came across the same issue. Not sure if you've solved this yourself but since this is open i'll post my 'fix' and hopefully it helps you.

I went into the file under C:\Users\username\AppData\Roaming\RevitPythonShell2019\RevitPythonShell.xml and just deleted the lines between the code <Commands> </Commands>. Restarted Revit and it runs normally. I don't know the reason behind why adding in the search paths gives this error, but for now i'm just not going to use it.

Hopefully that helps, see attached screenshot for 'final' file where username is your login name.

RevitPythonShell

Interesting, I didn't resolve it that way and I'll give it a try tomorrow. What I eventually did was I wrote a simple ribbon script for my Python script and it worked. It just wouldn't add my script to the ribbon when I used the search path but worked when I use a custom ribbon.

mariobonet commented 4 years ago

At first sight your proposal solved the problem as the error message disappears. But if you configure the first tool the bitmapStream-error comes right back. I use RVT2020 and therefore I followed the recommendation of installing PY2019, then copying into a 2020-directory what could have been a reason, but a friend told me the error already appears with RVT2019 and PY2019.

So I tried with a copy of my PY2016-XML-file (from old computer with RVT2016) with adjusted paths on my new RVT2020-computer (both Win10), but the error still remains. My friend thinks it could help to find out the directory where the bitmaps are located/generated 'cause the problem might be raised there. Further ideas or tipps?

koryserj94 commented 4 years ago

Hi all, I am trying to get my feet wet on using python in Revit and have limited experience in programming. I managed to install RPS in my computer and can see the add in tab. but once I configure the search path to: C:\Users\GHchan\AppData\Roaming\RevitPythonShell2019 and restart revit, this is the warning message I get, and the addin also dissappear. I tried to do some research myself but could not find the solution. Hope someone can give me some advice here. Thanks in advance!

image

If your question is still relevant, try to add largeImage, smallImage parameters into Command tag in RevitPythonShell.xml (my path to file C:\Users\User\AppData\Roaming\RevitPythonShell2019) like this one: solution It solved this problem for me.

ghkchan commented 4 years ago

Hi all, I am trying to get my feet wet on using python in Revit and have limited experience in programming. I managed to install RPS in my computer and can see the add in tab. but once I configure the search path to: C:\Users\GHchan\AppData\Roaming\RevitPythonShell2019 and restart revit, this is the warning message I get, and the addin also dissappear. I tried to do some research myself but could not find the solution. Hope someone can give me some advice here. Thanks in advance! image

If your question is still relevant, try to add largeImage, smallImage parameters into Command tag in RevitPythonShell.xml (my path to file C:\Users\User\AppData\Roaming\RevitPythonShell2019) like this one: solution It solved this problem for me.

yeah, i think there was a problem with the program overwriting the ribbon display. I did not put anything in the command line but changed my startup script to a python script creating icon in the ribbon. Which essentially is the same thing you did. image