You are on page 1of 3

Where is gui defined?

Is
this a global variable.

The Entry Names appear


to be that of the highlevel
tree folders and not
function RMBExtension() related to the CodeDef.
{
local cwin = gui:getActiveCollectionView(True); //Get the Model Browser/Collection Object
local e = cwin:getEntry("Part"); //Get the Entry to add the RMB extension
if ( e ) {
e:addMenuActionSeparator(); //Adds a Separation line to RMB menu
if (not e:hasMenuAction("New Custom Action")){ //Checks if Existing action exists
e:addMenuAction("New Custom Action", "Custom Action", "CustomActionCB", False):ignoreFilter(); //Adds Action
}
}
} Name Label RADE
What does the
Callback
ignoreFilter statement
function do?

Questions:
1. Where is gui defined? Is this a global variable?
2. The Entry Names appear to be that of the highlevel tree folders and not related to the CodeDef. Is
there a way to filter to further levels below within the tree? Is setMask() the method to do this?
3. What does the ignoreFilter() do?
Answers:
1. Where is gui defined? Is this a global variable?
A. Yes, GUI is a global variable. Not sure exactly where it is defined but someplace
like C:\MSC.Software\SimXpert\2010-20\data\.SimXpertrc. At least in this file you
can see it an other similar variables used.

2. The Entry Names appear to be that of the highlevel tree folders and not related to the
CodeDef. Is there a way to filter to further levels below within the tree? Is setMask()
the method to do this?
A. Yes, I ran into this too It looks like the names are either based on the Model
Browser organziation or the Collector Type. These are the names I know are valid
but something like Fields would seem to work:
• LBC Set,Model, Material, Property, Group, Table and LBC
In my API digging and based on another code that was sent to Tony Acevedo I
think you would have to get the top menu (as it is done now with getEntry) then
maybe something like “addNewMenuAction “to add another menu based on
CLexDictEntry.
Answers:

3. What does the ignoreFilter() do?


A. IgnoreFilter is so you do not need to set the top filter to say Part (for the example we gave out)
to select a Part and have the RMB functionality. Turn it off and you’ll see what happens.

You might also like