• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Accessing and modifying toolbar items in IC616

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 142
  • Views 14179
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Accessing and modifying toolbar items in IC616

RK56
RK56 over 9 years ago

Hi,

Problem 1:

I have followed the Solution Article 11478824  to create a toolbar in layout window. Now I need to access the items of toolbar and I have used hiGetToolbarObjName function to do that. But I'm looking for a generic way to access the items something like this

csToolbarGetElement(element) ;;;;;where element is a string which points to one of the toolbar item

csToolbarGetElement(element)~>value ;;;;;should return the value of the element

Problem 2:

I have created few subActions and a comboFiled to list the subActions. Whenever I select any subAction, I need to change the icon of the comboFiled. For example, I'm looking for a implementation similar to Options Toolbar -> Edit Snap Mode in layout window. Whenever I change the snap mode, the icon of the combo file changes notifying the user the present mode.

Please free to ask question in case I have not explained my need clearly.

Thanks

Ramakrishnan

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    If you have the toolbar object, you can find the names of the items, and then the attributes of all items. For example, for a schematic:

    toolbars=hiGetWindowToolbars(hiGetSessionWindow(hiGetCurrentWindow()))
    fileTB=car(exists(tb toolbars hiGetToolbarObjName(tb)=="File"))
    fileTB->items

    (schFileToolbarNew schFileToolbarOpen schFileToolbarCheckAndSave schFileToolbarSave)

    Then you can look at an individual item:

    fileTB->schFileToolbarNew->??

    (hiNameSym schFileToolbarNew hiType action hiCallback
        "schHiNewCellView()" hiIcon "new-file.png" hiIconText "New"
        _checkable nil checked nil enabled
        t defAction nil actionList nil
        hiToolTip "New" hiStatusTip ""
    )

    and so on. You can look at any of these fields (e.g. fileTB->schFileToolbarNew->hiToolTip)

    For your second question, look at <ICinstDir>/share/cdssetup/dfII/toolbars/byApplication/Layout.toolbars . You'll see the definition of Edit Snap Mode which refers to an actionList, each of which is declared as a subAction and has associated icons with each action. If you search in cdnshelp for "subAction" you'll get more info on how this works.

    Regards,

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • RK56
    RK56 over 9 years ago
    Hi Andrew,

    I figured a similar way for problem 1. But I guess I have not mentioned clearly my problem 2. Let me re ask the question

    Background: A combo field will have an icon and a pulldown of subactions. Each subaction will have their own icons. Now I click the dropdown and pick a subaction. I want the icon on the combo field to change to reflect/notify the user what subaction has been selected. This is happening with Edit snap mode action list.

    Question: Should I manually modify the hiIcon of the combo field or is there any automatic process that changes the icon of the combo field according to the subaction?

    Thanks
    Ramakrishnan
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Ramakrishnan,

    Got you - I didn't quite understand what you meant. There's no automatic process - the edit snap mode just updates the hiIcon (and hiTooltip). You can see this working if you get hold of the "Options" toolbar using the method I showed above and then do:

    optionsTB->lebEditSnapMode->hiIcon=optionsTB->lebEditSnapMode->lebEditDiagSnap->hiIcon

    Does that answer your question?

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RK56
    RK56 over 9 years ago
    Yes. Thanks for clarifying Andrew.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information