Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1069

Add tcl script to tcl/tk Application Dashboard

$
0
0

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


Viewing all articles
Browse latest Browse all 1069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>