Hello , i have a problem with closing and reopen and showing a toolbar ( like an update of him ), the code it’s attached at this post , what i m missing?
import rhinoscriptsyntax as rs
import Rhino
def updatetools():
update = 1 #0 = no update // 1 = ready for update
if update == 0:
rs.MessageBox("Everything is up to date")
exit()
else:
s = rs.ToolbarCollectionNames()
rs.HideToolbar("CPE_TOOLBAR","CPE_TOOLBAR")
rs.CloseToolbarCollection("CPE_TOOLBAR",False)
toolbar =rs.OpenToolbarCollection("P:\_Development\Rihno Python Scripts\CPE-RHINO\CPE_TOOLBAR.rui")
if toolbar:
test = rs.ShowToolbar("CPE_TOOLBAR","CPE_TOOLBAR")
if rs.IsToolbarVisible("CPE_TOOLBAR", "CPE_TOOLBAR"): print "The Layer toolbar is visible."
else: print "The Layer toolbar is not visible."
updatetools()