• 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 Capture CIS
  3. Howto avoid that Register Action on a schematic makes the...

Stats

  • State Not Answered
  • Replies 3
  • Subscribers 42
  • Views 894
  • Members are here 0
More Content

Howto avoid that Register Action on a schematic makes the Page dirty

PatEscher
PatEscher 9 months ago

Hello, 

through tcl customization we want to add a RMB action on the schematic page.
Unfortunately, the page is directly flagged as modified once we execute the Action.
Is there any way to avoid this?
This is the code we use.

The idea was to check if the page is already dirty (because of some modification done by the user before) and if not, we reset the dirty flag:

But when entering the callback "test2", the page is already dirty.

namespace eval ::testMenu {
proc test1 {args} {
return 1
}

proc test2 {args} {
puts "clicked"
}

RegisterAction "MenuTest" "::testMenu::test1" "" "::testMenu::test2" "Schematic"


}

  • Cancel
  • Sign in to reply
  • CadAP
    0 CadAP 9 months ago

    PatEscher 

    Can you try below code:

    Select a page in PM tree and source below code:

    set lStatus [DboState]

    set lSelectedPage [GetSelectedPMItems]

    set lModifiedTime [$lSelectedPage GetModifyTime $lStatus]

    set lDboLib [$lSelectedPage GetContainingLib]

    set lModifiedCString [$lDboLib TimeToString $lModifiedTime]


    puts "[DboTclHelper_sGetConstCharPtr $lModifiedCString]"

    So, getting the exact day and date you can decide what whether to reset the flag or not.

    Hope this helps!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • PatEscher
    0 PatEscher 9 months ago in reply to CadAP

    Hi CadAP, 

    not sure where to put this. Into the Action Callback?
    for me it seems that modifying the page when the call back is executed (even if we do a no-op) is a bug. I already reported a case on it.

    And does it work with my use case?

    I have a page open and then select a symbol. Then I do the RMB --> More --> MenuTest my callback should then simply call e.g. a Browser

    The problem is, that once the callback is executed, the page is shown as modified.
    So what is your code doing exactly? It is reading out the ModifyTime of the page? but based on what? the last save operation of the page?

    Thanks for your help, 

    Patrick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • PatEscher
    0 PatEscher 9 months ago in reply to PatEscher

    CadAP 
    so we found some way to identify if the page was modified or not.
    But currently we are struggling  with reseting this modified state

    Can you provide some tcl code or routines to reset the modified flag of the page?
    Worst case it would be possible to save only this page (but certainly not the full design or other pages, as there might be some other changes). Can you provide some examples?
    We tested a few tcl commands like clearModified() but doesn#t seem to work

    thanks
    Patrick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
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