good day
It was working well but I stop working.
I thank any help
I downloaded it from this link ; but on my pc it does not work
good day
It was working well but I stop working.
I thank any help
I downloaded it from this link ; but on my pc it does not work
Hi @vikthor,
There is a lot going on in the thread youâve referenced. Can you just upload the source code that is not working for you?
â Dale
is this
SetObjDisplayModeAllViewports.py (1.2 KB)
Message: El valor no puede ser nulo.
Nombre del parĂĄmetro: item
Traceback:
line 629, in ListBox, âC:\Users\Administrador.DESKTOP-4J5EPO7\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\userinterface.pyâ
line 19, in SetObjDisplayModeAllViewports, âC:\Users\Administrador.DESKTOP-4J5EPO7\Downloads\SetObjDisplayModeAllViewports.pyâ
line 35, in , âC:\Users\Administrador.DESKTOP-4J5EPO7\Downloads\SetObjDisplayModeAllViewports.pyâ
It would be good to know what version of Rhino you are running and on which platform. Looks like you are running in Spanish.
The line where it is erroring out is where it wants to create a list box with the names of all the display modes found to put on-screen and let you choose. The list box method needs a valid list supplied in order to work and in your case looks like that list - called modeNames - is None, i.e. trying to get the list of display modes has failed a couple of lines earlier.
The two lines trying to collect the display modes currently on your system are these:
dModes = Rhino.Display.DisplayModeDescription.GetDisplayModes()
modeNames=[dMode.LocalName for dMode in dModes if not dMode.PipelineLocked]
So, I donât know why it is failing, I suspect some localization error⌠The âstandardâ display mode names are localized, but any custom ones are notâŚ
You say it worked previously. When did it stop? What changed? --Mitch
Rhino 5 (SR14)
thanks for the reply
I used to work on another user of the same PC but the user stopped working and now I use the PC administrator.
that change caused havoc only in this script
how can I create the location to work correctly
Can you just run the following code and post what it prints out?
import Rhino
dModes = Rhino.Display.DisplayModeDescription.GetDisplayModes()
if dModes:
EmodeNames=[dMode.EnglishName for dMode in dModes if not dMode.PipelineLocked]
LmodeNames=[dMode.LocalName for dMode in dModes if not dMode.PipelineLocked]
print "English: {}".format(EmodeNames)
print "Local: {}".format(LmodeNames)
else:
print "GetDisplayModes() Failed!"
this is
English: [âWireframeâ, âShadedâ, âRenderedâ, âGhostedâ, âX-Rayâ, None, None,âAuxpeckerRenderedâ, âblancoâ, âazulâ, âBlueprintâ, âMioâ, âgreenâ, âWhiteâ,âThea Renderâ]
Local: [uâEstructura al\xe1mbricaâ, âSombreadoâ, âRenderizadoâ, âSemitransparenteâ, âRayos Xâ, None, None, âAuxpeckerRenderedâ,âblancoâ, âazulâ, âBlueprintâ, âMioâ, âgreenâ, âWhiteâ,âThea Renderâ]
Iâve also tested it in safe mode, and it gives the same 2Traceback message "from the previous post
I do not know if this is helpful, but whenever the rhinoceron speaks, that message appears on the lower right side.
OK, thatâs pretty informative. There appear to be two display modes that are causing problems - the display mode description returns âNoneâ which means that the function failed to get a name for those two modes. I donât know what they are, but they are in your list between âX-Rayâ and âAuxpecker renderedâ.
I will add some error checking to this and see if I can make it work better and ignore the bad entries - but I am having trouble with the non-standard display modes now, so I donât really know how reliable I can make itâŚ
Edit @vikthor : OK, here is a re-write of the script with an attempt to eliminate the above-mentioned errors - give it a shot and let me know if it works any better.
SetObjDisplayModeAllViewports.py (1.8 KB)
As far as the Auxpecker nag screen goes, I know nothing about thatâŚ
âMitch