• 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 Scripting - Skill
  3. Allegro SKILL: Get selected item on canvas dbid

Stats

  • Replies 2
  • Subscribers 18
  • Views 11100
  • Members are here 0
More Content

Allegro SKILL: Get selected item on canvas dbid

Bijanbina
Bijanbina over 7 years ago

Hi

In Allegro I want to get selected item that user select before running script and then get its xy position. I don't want to use axlSelect cause it need user to select part again. I see in this thread, registering the command as "general" do the tricks but after try it in Allegro 17.2 HF045, its not working for me Disappointed Am I doing something wrong?

Tested Scenario

1. Load following code

defun( testPick (), printf("COUNT=%d",axlGetSelSetCount()))
axlCmdRegister("tpk" 'testPick ?cmdType "general")

2. Select symbol

3. run tpk in command mode

4. command print COUNT=0 :(((

Please Help!!!!! I'm working almost a week to create my script and now I stuck in this stupid step!

Thanks

Selected Screenshot

  • Cancel
  • Sign in to reply
Parents
  • B Bruekers
    B Bruekers over 7 years ago

    The best to do (i think) is to set a trigger for selection events. 

    See in the SKILL api: axlTriggerSet(nil nil)
    Triggers supported: (open save close exit menu xprobe select)

    So you need to set a 'select' trigger (before the selections occur!) pointing to a function.  This function gets the selection data, and you need to store it into a global variable. 

    This trigger function should not do more, see also the API about performance of this trigger. 

    Then when you run your program it takes the selection data from the global and uses it.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Bijanbina
    Bijanbina over 7 years ago in reply to B Bruekers

    WoW. Thanks Bruekers. I never thought that there be a way to overcome this.

    I will try that and share the result.

    God bless you

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Bijanbina
    Bijanbina over 7 years ago in reply to B Bruekers

    WoW. Thanks Bruekers. I never thought that there be a way to overcome this.

    I will try that and share the result.

    God bless you

    • 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