Pure luck...I've never really worked with the Softimage API before, so perhaps my being nieve helped figure this out :).
Also as I found out afterwards and this blog post<http://xsisupport.com/2013/07/09/identifying-tear-off-menus/> states, you can pass any string to GetAttributeValue and it will return the Menu Window's title. -tony On Tue, Jul 9, 2013 at 2:58 AM, Stefan Kubicek <[email protected]> wrote: > > xsi = Application >> ad = xsi.Desktop.ActiveLayout >> for N in ad.Views: >> if N.Type == "Menu Window": >> print N.GetAttributeValue("metadata"**) >> > > This is gold! I'm really curious as to how you found that. > I've been attempting to do more with menus for years, but the SDK > functionality is just not there, and it doesn't seem to have any dev > priority whatsoever. > E.g., there is no method to get rid of factory-installed menu items, or > insert custom menu items between factory-installed ones (can't enumerate > menu items), or is there? > > > This will return the name of the Menu Window...don't ask how I found that, >> pure luck. >> >> I now realize even getting the name won't be enough to know it's part of >> my >> menu. If someone tears off a sub-menu for instance, the name will not be >> the same name as the original Menu name. >> >> -tony >> >> >> >> On Mon, Jul 8, 2013 at 5:29 PM, Tony Barbieri <[email protected]> wrote: >> >> Thanks Luc-Eric. >>> >>> I am able to find the torn off menu but I'm trying to find the right one. >>> Using this: >>> >>> xsi = Application >>> ad = xsi.Desktop.ActiveLayout >>> for N in ad.Views: >>> print N.Name >>> >>> prints Menu Window. Is there a way to find the title of the torn off >>> Menu >>> Window so I can be sure it's the right one I want to close?' >>> >>> -tony >>> >>> >>> On Mon, Jul 8, 2013 at 4:51 PM, Luc-Eric Rousseau <[email protected] >>> >wrote: >>> >>> I think you should be able to find the tear off menu view by searching >>>> for the floating window on the desktop, and then close that. >>>> doesn't it apear in the Window menu? >>>> >>>> On Mon, Jul 8, 2013 at 4:40 PM, Tony Barbieri <[email protected]> >>>> wrote: >>>> > Thanks for the reply, Brad!! >>>> > >>>> > Wasn't sure if you had messed with that...bummer... >>>> > >>>> > -tony >>>> > >>>> > >>>> > On Mon, Jul 8, 2013 at 4:37 PM, Bradley Gabe <[email protected]> >>>> wrote: >>>> >> >>>> >> Hi Tony- >>>> >> >>>> >> I remember looking into that issue and coming up empty handed. I >>>> don't >>>> >> think the SDK provides any handles for menu windows, or at least it >>>> didn't >>>> >> in the versions we were using. >>>> >> >>>> >> -B >>>> >> >>>> >> Sent from my iPhone >>>> >> >>>> >> On Jul 8, 2013, at 3:08 PM, Tony Barbieri <[email protected]> >>>> wrote: >>>> >> >>>> >> > Hello! >>>> >> > >>>> >> > I am working on a project that is dynamically rebuilding menus with >>>> >> > different entries. The menu building is all functioning >>>> correctly...unless >>>> >> > a torn off menu exists. The non-torn off menu is updated >>>> correctly, >>>> but the >>>> >> > torn off menu becomes orphaned because the old callbacks no longer >>>> exist in >>>> >> > memory. >>>> >> > >>>> >> > Ideally (and I know this is a long shot) we would rebuild the torn >>>> off >>>> >> > menu. If that is not possible then I would just like to close any >>>> torn off >>>> >> > menus to limit confusion as to why pressing a menu item no longer >>>> does >>>> >> > anything. >>>> >> > >>>> >> > Are either of these solutions currently possible? >>>> >> > >>>> >> > Thanks much! >>>> >> > >>>> >> > -- >>>> >> > -tony >>>> >> >>>> > >>>> > >>>> > >>>> > -- >>>> > -tony >>>> >>>> >>> >>> >>> -- >>> -tony >>> >>> >> >> >> > > -- > ------------------------------**--------------- > Stefan Kubicek [email protected] > ------------------------------**--------------- > keyvis digital imagery > Alfred Feierfeilstraße 3 > A-2380 Perchtoldsdorf bei Wien > Phone: +43 (0) 699 12614231 > www.keyvis.at > -- This email and its attachments are -- > -- confidential and for the recipient only -- > > -- -tony

