Product Documentation
Virtuoso Schematic Editor SKILL Functions Reference
Product Version IC23.1, November 2023

schRegisterPopUpMenu

schRegisterPopUpMenu( 
t_category 
r_menuHandle 
t_mode 
)
=> t / nil

Description

Replaces the object-sensitive menus (OSMs) of the schematic canvas with a specific object category and edit mode. This function should only be called after a schematic cellview has been opened and the schematic editor has been initialized. To ensure this, call schRegisterPopUpMenu() from a callback registered using deRegUserTriggers().

schRegisterPopUpMenu(
  t_category
  r_menuHandle
  t_mode
  )
  => t / nil

Arguments

t_category

Object type category to be replaced.

Valid values: "wire", "instance", "instPin", "label", "marker", "schNone", "schPin", "schMultiple", "schUnknown", "shapes", "symPin", "symNone", "symUnknown", "symMultiple", "schStandard", "symStandard", "indexDefault", "indexInstPin", "indexPin", "indexSheet", "border".

r_menuHandle

Specifies the menu to be displayed. r_menuHandle is created by hiCreateMenu, as documented in the Cadence SKILL Language Reference.

t_mode

Access mode for which r_menuHandle is registered; must be enclosed in quotation marks. If you do not specify the mode, both modes are reassigned.
Valid Values: view, edit

Value Returned

t

Registered r_menuHandle for a specific object type to customize the OSMs.

nil

Replacement was unsuccessful.

Examples

Registers newInstanceMenu as the OSM to display when the cursor is over an instance when the current cellview is opened in read mode.

schRegisterPopUpMenu( "instance" newInstanceMenu "view" )

Registers newInstanceMenu as the OSM to display when the cursor is over an instance when the current cellview is opened in edit mode.

schRegisterPopUpMenu( "instance" newInstanceMenu "edit" )

The following table shows object type selections.

ObjType (Category) Selection

instance

instances

schPin

schematic pins

instPin

schematic instance pins

wire

wire (narrow) or wire (wide)

label

labels

marker

rectangle with layer

schNone

nothing under the cursor for schematic cellview

schMultiple

more than one object under cursor

symPin

symbol pins

shapes

symbol shapes

symNone

nothing under cursor for symbol cellview

symMultiple

more than one object under cursor

symUnknown

unknown figure under cursor

schStandard

schematic pop-up for nonsensitive

symStandard

symbol pop-up for nonsensitive

indexSheet

instance of sheet in index cellview

indexPin

pin in index schematic

indexInstPin

instance pin in index schematic

indexDefault

any other object in index schematic

border

sheet border in schematic cellview

procedure( CDNCreateAndRegisterObjectMenus()
  let((item1 item2 menu)
    item1 = hiCreateMenuItem(
              ?name 'itemOne
              ?itemText "One"
              ?callback "println(1111)"
            )
    item2 = hiCreateMenuItem(
              ?name 'itemTwo
              ?itemText "Two"
              ?callback "println(2222)"
            )
    menu = hiCreateMenu(
             'MyInstanceMenu
             "My Instance Menu"
             list(item1 item2))
    schRegisterPopUpMenu("instance" menu "edit")
  )
)
deRegUserTriggers("schematic" nil nil 'CDNCreateAndRegisterObjectMenus)

Related Topics

Cadence SKILL Language Reference


Return to top
 ⠀
X