Home > Community > Forums > PCB SKILL > how to use "insertXMlMenu" in capture

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 how to use "insertXMlMenu" in capture 

Last post Thu, Jul 4 2013 6:04 AM by PEscher. 2 replies.
Started by robin chu 08 May 2013 01:41 AM. Topic has 2 replies and 753 views
Page 1 of 1 (3 items)
Sort Posts:
  • Wed, May 8 2013 1:41 AM

    • robin chu
    • Not Ranked
    • Joined on Tue, Apr 17 2012
    • shanghai, Shanghai
    • Posts 11
    • Points 175
    how to use "insertXMlMenu" in capture Reply

     There is a "insertXMLMenu"  function in capture's tcl demo as follow:

    InsertXMLMenu [list [list "TopLevelMenu"] "" "" [list "popup" "&TopLevelMenu" "0"]]

    InsertXMLMenu [list [list "TopLevelMenu" "SubMenu" ] "" "" [list "action" "&SubMenu..." "0" "SubMenuActionLabel" "MenuUpdateLabel"]]

     I don't know how to fill in the parameters.

    Is there I can find a document that explain these functions?

    Filed under: ,
    • Post Points: 20
  • Mon, May 13 2013 8:36 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    Re: how to use "insertXMlMenu" in capture Reply

    Hi

    Sample menu below, you need to register the function

    InsertXMLMenu [list [list "NordcadMenu"] "" "" [list "popup" "&Nordcad" "0"]]
    InsertXMLMenu [list [list "NordcadMenu" "SampleAlwaysEnabled1" ] "" "" [list "action" "&Intelligent PDF..." "0" "sampleEnabledAction1" "sampleEnabledUpdate1"]]

    proc disableMenuUpdate {} {
    return false
    }

    proc enableMenuAction1 {} {
    set lMessage "Creating PDF"
    set lMessageStr [DboTclHelper_sMakeCString $lMessage]
    DboState_WriteToSessionLog $lMessageStr
    MenuCommand "65004"
    return true

    proc enableMenuUpdate {} {
     return true
    }
    RegisterAction "sampleEnabledUpdate1" "capTrue" "" "enableMenuUpdate" ""

    RegisterAction "sampleDisabledUpdate" "capTrue" "" "disableMenuUpdate" ""

    RegisterAction "sampleEnabledAction1" "capTrue" "" "enableMenuAction1" ""

    documentation is found in %cdsroot%\tools\capture\tclscripts\OrCAD_Capture_TclTk_Extensions.pdf

    samples are found in the same directory

    Best regards

    Ole

    Best regards Ole
    • Post Points: 20
  • Thu, Jul 4 2013 6:04 AM

    • PEscher
    • Not Ranked
    • Joined on Wed, Apr 24 2013
    • Posts 1
    • Points 5
    Re: how to use "insertXMlMenu" in capture Reply
    Hi Ole, do you know if it is possible to also add such kind of menu directly into the PM tree? When we use the registerAction with 'PM' at the end it will always show up in the "more..." section, but we want our commands and menus directly at the top Thanks Patrick
    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by robin chu at 08 May 2013 01:41 AM. Topic has 2 replies.