Customizing and Uninstalling the Shelf

Customizing the Shelf

You can extend and add objects to the shelf by editing the Shelves.xml configuration file in a text editor. In Windows, the Shelves.xml file is saved in C:\Users\<username>\Documents\MB\<year>-x64\config. In Linux, the Shelves.xml file is saved in /home/<username>/MB/<year>/config. The following section explains the Shelves.xml configuration file.

<Shelves>  <!-- This is the root node. Do not modify it. -->
  <Shelf title="Files"> <!-- This is a new shelf with its name. -->
    <Item title="New File" hint="New File" image="python/newScript.png">FBApplication().FileNew ()</Item>
    <!-- This is a new shelf button with the label, hint, image, and inline code to execute. -->
    <Item title="Open..." hint="Open File" image="python/openScript.png" script="FBApplication_FileOpen" />
    <!-- This is a new shelf button with the label, hint, image, and script reference to execute.
    The reference is in the Scripts section. -->

    <Item title="Open..." hint="Open File" image="python/openScript.png" script="fullpathfilename.py" />
    <!-- This is a new shelf button with the label, hint, image, and script file reference to execute.
    The file must be ready to execute like in the script editor. -->

    <Item title="Mapping" hint="Mapping" width="48">FBConstraintManager().TypeCreateConstraint (12)</Item>
    <!-- This is a new shelf button with the label, hint, no image, and inline code to execute.
    The width parameter is used to make the button larger for displaying the full text. -->


...

  <Scripts>
    <Script name="FBApplication_FileOpen">
      <![CDATA[ <!-- Code to execute --> ]]>
    </Script>


    

Uninstalling the Shelf

The shelf plug-in is installed by default. To uninstall the shelf, you must delete the plug-in from the plug-in folder as follows.