• 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. Functional Verification
  3. Solved :: added tcl script in the menu instead::Add tcl...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 66
  • Views 3333
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Solved :: added tcl script in the menu instead::Add tcl script to tcl/tk Application Dashboard

vidyutt
vidyutt over 12 years ago

Hi,

 I have created a small tcl script to modify the some properties on the Title Block. I wish to add the Script to the TCL/Tk Applications Dashboard.I followed the instructions in the OrCAD_Capture_TclTk_Extensions.pdf. I have added the script in the folder “C:\Cadence\SPB_16.5\tools\capture\tclscripts\capUtils” and modified the file capApps.tcl in the “C:\Cadence\SPB_16.5\tools\capture\tclscripts\capForms” folder. I restart my Orcad Session, I can see the entry in the dashboard. However, upon clicking on ‘Launch’ I get the error "error ::capTitleBlockEditUtil::EditTitleBlockOnPage not defined"

my script is ::

package require Tcl 8.4

package require DboTclWriteBasic 16.3.0

package provide capTitleBlockEditUtil 1.0

 

namespace eval capTitleBlockEditUtil {

namespace export EditTileBlockOnPage

}

proc capTitleBlockEditUtil::EditTileBlockOnPage {} {
set lSession $::DboSession_s_pDboSession
DboSession -this $lSession
set lStatus [DboState]
set pDesignPath C:/ecad/staging/vila/bimu_1405135821/orcad/latest/0010/test.dsn
set lDesignPath [DboTclHelper_sMakeCString $pDesignPath]
set lDesign [$lSession GetDesignAndSchematics $lDesignPath $lStatus]

set pSchematicName SCHEMATIC1
set lSchematicName [DboTclHelper_sMakeCString $pSchematicName]
set lSchematic [$lDesign GetSchematic $lSchematicName $lStatus]

set pPageName PAGE1
set lPageName [DboTclHelper_sMakeCString $pPageName]
set lPage [$lSchematic GetPage $lPageName $lStatus]

set lTitleBlockId [$lPage GetTitleBlockDisplayed  $lStatus]
set Titile [$lPage GetTitleBlock $lTitleBlockId $lStatus]

set pPname Title
set lTitlePName [DboTclHelper_sMakeCString $pPname]
set lNameValue [DboTclHelper_sMakeCString]

$Titile  GetUserPropStringValue  $lTitlePName $lNameValue

puts [DboTclHelper_sGetConstCharPtr $lNameValue]
set pPropValue CHANGED
set lPageName [DboTclHelper_sMakeCString $pPageName]
$Titile SetUserPropStringValue $lTitlePName $lPageName

} 

  • Cancel
Parents
  • oldmouldy
    oldmouldy over 12 years ago
    I am pretty sure that your "proc" is not in the namespace, I reckon you need a "proc ::capTitleBlockEditUtil::EditTitleBlockOnPage" to define the proc. Equally hacking in the supplied files is probably not too great an idea, for example, what happens if "Page" is not active? You might be better of extending the pop-up menu to add your utility since you can be sure what is active when the utility runs. This will also be easier to move around the releases. You can use the orcad_scripting email alias to access "real intelligence" on TCL scripting in Capture.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • oldmouldy
    oldmouldy over 12 years ago
    I am pretty sure that your "proc" is not in the namespace, I reckon you need a "proc ::capTitleBlockEditUtil::EditTitleBlockOnPage" to define the proc. Equally hacking in the supplied files is probably not too great an idea, for example, what happens if "Page" is not active? You might be better of extending the pop-up menu to add your utility since you can be sure what is active when the utility runs. This will also be easier to move around the releases. You can use the orcad_scripting email alias to access "real intelligence" on TCL scripting in Capture.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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