• 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. The GetOccurrencesCount function (Orcad Capture CIS 16.6...

Stats

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

The GetOccurrencesCount function (Orcad Capture CIS 16.6) behaves abnormally when run in a standalone Tcl shell

LL202411014740
LL202411014740 3 months ago
HELP!!!!
When using OrCAD Capture CIS in Cadence 16.6, I encountered an issue where obtaining the Occ from the schematic Inst was ineffective:
  •  Directly entering the following command in the OrCAD Capture CIS command window returns the Occ count correctly:

```TCL

set lSession $::DboSession_s_pDboSession
DboSession -this $lSession
set lDesign [GetActivePMDesign]

set lStatus [DboState]

set pSchematicName "T1"
set lSchematicName [DboTclHelper_sMakeCString $pSchematicName]
set lSchematic [$lDesign GetSchematic $lSchematicName $lStatus]
$lSchematic GetOccurrencesCount

# this code return 2

```

  • Invoking the same command in the Tcl shell returns null.

```TCL

C:\Cadence\SPB_16.6\tools\tcltk\8.4\bin\wish.exe
load {C:\Cadence\SPB_16.6\tools\capture\orDb_Dll_Tcl.dll} DboTclWriteBasic


set lSession $::DboSession_s_pDboSession
DboSession -this $lSession


set lSession [DboTclHelper_sCreateSession]
set lStatus [DboState]
set pDesignPath {D:\work\orcad Tcl\DESIGN1.DSN}
set lDesignPath [DboTclHelper_sMakeCString $pDesignPath]
set lDesign [$lSession GetDesignAndSchematics $lDesignPath $lStatus]
set pSchematicName "T1"
set lSchematicName [DboTclHelper_sMakeCString $pSchematicName]
set lSchematic [$lDesign GetSchematic $lSchematicName $lStatus]
$lSchematic GetOccurrencesCount

# this code return 0

DboTclHelper_sSetDboObjectInProcess $lDesign

$lSchematic GetOccurrencesCount

# this code return 0

```

  • Sign in to reply
  • Cancel
  • LL202411014740
    +1 LL202411014740 3 months ago

    The issue also occurs when using set lSession [DboTclHelper_sCreateSession] in OrCAD's Command Window to generate lSession. However, it works properly with the following commands:

    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject 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