Allegro System Capture App Notes

Listing Project Directives

Issue link: https://resources.pcb.cadence.com/i/1180244

Contents of this Issue

Navigation

Page 5 of 6

Listing Project Directives in Allegro System Capture Learn more at Cadence Support Portal - https://support.cadence.com © 2019 Cadence Design Systems, Inc. All rights reserved w orldw ide. Page 6 Tcl Script # ---------------------------------------------------------------------------- # Filename: dumpProject.tcl # This file should be placed in one of the following locations: # 1. For site-wide availability place it at - # $CDS_SITE/cdssetup/canvas/resources/syscap/ # 2. For user-only availability place it at - # $HOME/cdssetup/canvas/resources/syscap/ # ---------------------------------------------------------------------------- # Description: TCL script to list all the project variables in CPM files. # ---------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------- ----- # Procedure Name : dumpProject # Description : This procedure is used to generate the file with a specific name and at a # specific destination. This file lists all the variables in the CPM files like # Section names, Directive names and the directive values. This procedure takes # destination file path as a mandatory argument and file name as an optional argument. # Inside this procedure:- # All the sections are fetched using cps::getSections. # All the directives for a particular section are fetched using cps::getDirectives # All the directive values are fetched using cps::getDirectiveValue # -------------------------------------------------------------------------------------------------- namespace eval sdaProjUtils { set nThisDir [file dirname [info script]] set nInited {} } proc sdaProjUtils::dumpProject {filePath {fileName {}} } { if {$fileName== {}} { set fileName "ProjectDetails.txt" } set filePath1 [file join $filePath $fileName] set op [open $filePath1 "w+"] set sectionList [cps::getSections] foreach section $sectionList { set directiveList [cps::getDirectives $section] foreach directive $directiveList { set valueList [cps::getDirectiveValue $section $directive] set value1 [concat $section ":" $directive ":" $valueList] puts $op $value1 } } close $op exec {*}[auto_execok start] {} $filePath1 } sdaProjUtils::dumpProject [pwd] #end of file

Articles in this issue

Links on this page

view archives of Allegro System Capture App Notes - Listing Project Directives