cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a new Riibon bar from the existing ribbon bar..

Pioneer
Pioneer

Hi All,

 

I had created a ribbon bar tab using an .rtb file put it in application folder. Now I want to create an new ribbon bar tab from once the user clicks on the previous ribbon bar tab. Can anyone help me to do this in Python.

 

Thanks

 

2 REPLIES

Re: Creating a new Riibon bar from the existing ribbon bar..

Creator
Creator

I'm not sure that's possible.  NX loads the toolbars/ribbon bars at the begining of the session.  Even if you write a program to modify your menuscript and ribbon toolbar on a user click, the session would have to be closed and a new session started in order for the modification to be read.

Re: Creating a new Riibon bar from the existing ribbon bar..

Siemens Phenom Siemens Phenom
Siemens Phenom

I've not tried this to see if it works, but I see the following Open C methods were added in NX 9:

 

  • NXOpen.UF.UFUi.CreateRibbon(String, Integer, ByRef System.IntPtr)
  • NXOpen.UF.UFUi.RemoveRibbon(System.IntPtr)
  • NXOpen.UF.UFUi.AskRibbonVis(System.IntPtr, ByRef Integer)
  • NXOpen.UF.UFUi.SetRibbonVis(System.IntPtr, Integer)

 

What is not clear is if the file needs to be in an application directory at NX startup or if the application directory collection is re-parsed when NXOpen.UF.UFUi.CreateRibbon() is called.