• 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 - TCL
  3. Use TCL to get all "page name" when no title block

Stats

  • State Verified Answer
  • Replies 1
  • Subscribers 14
  • Views 320
  • Members are here 0
More Content

Use TCL to get all "page name" when no title block

RS202512234819
RS202512234819 1 month ago

Hi, Sir:

     at now, my design had no titleblock on the all pages,

and I want to use TCL to put titleblock an the all pages,

but I can't get the "page name"  value at the time.

How can I do to get the all "page name"?

use want method to do it?

thanks!

  • Cancel
  • Sign in to reply
Parents
  • CadAP
    +1 CadAP 1 month ago

    RS202512234819 


    proc lGetAllPages {} {

    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lStatus [DboState]
    set lDesign [$lSession GetActiveDesign]
    set lSchi_Name [DboTclHelper_sMakeCString]

    if {$lDesign != $lNullObj} {

    set lSchematicIter [$lDesign NewViewsIter $lStatus $::IterDefs_SCHEMATICS]
    #get the first schematic view
    set lView [$lSchematicIter NextView $lStatus]

    set lPage_Name [DboTclHelper_sMakeCString]


    while { $lView != $lNullObj} {
    #dynamic cast from DboView to DboSchematic
    set lSchematic [DboViewToDboSchematic $lView]
    $lSchematic GetName $lSchi_Name
    set lPagesIter [$lSchematic NewPagesIter $lStatus]
    #get the first page
    set lPage [$lPagesIter NextPage $lStatus]

    # puts [DboTclHelper_sGetConstCharPtr $lSchi_Name]

    while {$lPage!=$lNullObj} {
    #placeholder: do your processing on $lPage
    $lPage GetName $lPage_Name
    puts [DboTclHelper_sGetConstCharPtr $lPage_Name]
    lappend pagelist [DboTclHelper_sGetConstCharPtr $lPage_Name]
    #get the next page
    set lPage [$lPagesIter NextPage $lStatus]
    }
    #placeholder: do your processing on $lSchematic

    #puts $lSchematic

    #get the next schematic view
    set lView [$lSchematicIter NextView $lStatus]
    }
    delete_DboLibViewsIter $lSchematicIter
    delete_DboSchematicPagesIter $lPagesIter

    } else { puts "No Active Design"; orPrm::DestroyWidget $i}

    return $pagelist

    }

    lGetAllPages 

    Above code will return all page names in a list format in capture command console.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Reply
  • CadAP
    +1 CadAP 1 month ago

    RS202512234819 


    proc lGetAllPages {} {

    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lStatus [DboState]
    set lDesign [$lSession GetActiveDesign]
    set lSchi_Name [DboTclHelper_sMakeCString]

    if {$lDesign != $lNullObj} {

    set lSchematicIter [$lDesign NewViewsIter $lStatus $::IterDefs_SCHEMATICS]
    #get the first schematic view
    set lView [$lSchematicIter NextView $lStatus]

    set lPage_Name [DboTclHelper_sMakeCString]


    while { $lView != $lNullObj} {
    #dynamic cast from DboView to DboSchematic
    set lSchematic [DboViewToDboSchematic $lView]
    $lSchematic GetName $lSchi_Name
    set lPagesIter [$lSchematic NewPagesIter $lStatus]
    #get the first page
    set lPage [$lPagesIter NextPage $lStatus]

    # puts [DboTclHelper_sGetConstCharPtr $lSchi_Name]

    while {$lPage!=$lNullObj} {
    #placeholder: do your processing on $lPage
    $lPage GetName $lPage_Name
    puts [DboTclHelper_sGetConstCharPtr $lPage_Name]
    lappend pagelist [DboTclHelper_sGetConstCharPtr $lPage_Name]
    #get the next page
    set lPage [$lPagesIter NextPage $lStatus]
    }
    #placeholder: do your processing on $lSchematic

    #puts $lSchematic

    #get the next schematic view
    set lView [$lSchematicIter NextView $lStatus]
    }
    delete_DboLibViewsIter $lSchematicIter
    delete_DboSchematicPagesIter $lPagesIter

    } else { puts "No Active Design"; orPrm::DestroyWidget $i}

    return $pagelist

    }

    lGetAllPages 

    Above code will return all page names in a list format in capture command console.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • 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.

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

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