• 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. Allegro X PCB Editor
  3. build a popup of "Temp Group"

Stats

  • Replies 7
  • Subscribers 160
  • Views 4476
  • Members are here 0
More Content

build a popup of "Temp Group"

SkilSiao
SkilSiao over 13 years ago

Hi all, I want to make an item of "Temp Group" in Right-click popup (which is same as "copy" "move" command)

so that user can make continuous selection.

my function look like this:

mypopup = axlUIPopupDefine(nil '(
    ("Done" "axlDBTransactionCommit(mark), axlFinishEnterFun()")
    ("Oops" "axlDBTransactionOops(mark), when(zerop(--oopsNum), printf(\"Nothing Selected!\\n\")")
    ("Cancel" "axlDBTransactionRollback(mark), axlCancelEnterFun()")
    ("MENU_SEPARATOR", nil)
 ("Temp Group" "axlUIPopupSet(mypopup1) ... "))) ; end define the popup
 axlUICmdPopupSet(mypopup)

 mypopup1 =  axlUIPopupDefine(nil '(
    ("Done" "axlDBTransactionCommit(mark), axlFinishEnterFun()")
    ("Oops" "axlDBTransactionOops(mark), when(zerop(--oopsNum), printf(\"Nothing Selected!\\n\")")
    ("Cancel" "axlDBTransactionRollback(mark), axlCancelEnterFun()")
    ("MENU_SEPARATOR", nil)
 ("Complete" " ... "))) ; end define the popup
 axlUIPopupSet(mypopup1)

 axlSetFindFilter(?enabled ... ?onButtons ...)

 while( axlSelect(?prompt sprintf(nil "Select object(s) to continue.\n"))

temp_list = axlGetSelSet()

caseq(length(temp_list)  (0 ...) (1 ...) (t ...)

) ; end caseq

) ; end while

I have been thinking of how to write function for the "Temp Group" and "Complete" so that the selection done by user

can be stored in temp_list, because in the while loop, the temp_list = axlGetSelSet() to allow a single selection.

 anyone can help. thanks in advance.

  • Sign in to reply
  • Cancel
Parents
  • Silver John
    Silver John over 13 years ago

    I have not tested this code, now I haven't ability for this.

    This is a direct, linear solution, and can not be the best.

    done = nil
    selected_obj = nil ; JIC
    one_point = nil ; JIC
    mark = axlDBTransactionStart() 

    while( done == nil
        axlSelect(?prompt "Select object(s) to continue.") ; waiting user pick
        selected_obj = axlGetSelSet()
         
        if(selected_obj then
            one_point = axlEnterPoint(?prompts "Select a point.") ; waiting user pick
        )
        if( (selected_obj && one_point) then
            axlDBTransactionMark(mark)
            printf("DO IT")
            selected_obj = nil
            one_point = nil
        )
    );end while

    defun( myOops ()
        axlFinishEnterFun() ; exit from wating operations
        axlDBTransactionOops(_alnTransactionMark)
    );end-fun

    defun( myDone ()
        axlDBTransactionCommit( _alnTransactionMark )
        done = t
    );end-fun

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Silver John
    Silver John over 13 years ago

    I have not tested this code, now I haven't ability for this.

    This is a direct, linear solution, and can not be the best.

    done = nil
    selected_obj = nil ; JIC
    one_point = nil ; JIC
    mark = axlDBTransactionStart() 

    while( done == nil
        axlSelect(?prompt "Select object(s) to continue.") ; waiting user pick
        selected_obj = axlGetSelSet()
         
        if(selected_obj then
            one_point = axlEnterPoint(?prompts "Select a point.") ; waiting user pick
        )
        if( (selected_obj && one_point) then
            axlDBTransactionMark(mark)
            printf("DO IT")
            selected_obj = nil
            one_point = nil
        )
    );end while

    defun( myOops ()
        axlFinishEnterFun() ; exit from wating operations
        axlDBTransactionOops(_alnTransactionMark)
    );end-fun

    defun( myDone ()
        axlDBTransactionCommit( _alnTransactionMark )
        done = t
    );end-fun

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

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