• 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. how to create a design file in capture using tcl

Stats

  • State Not Answered
  • Replies 0
  • Subscribers 13
  • Views 14
  • Members are here 0
More Content

how to create a design file in capture using tcl

digital1
digital1 10 hours ago

Im trying to create a design in capture programatticaly using tcl here is my code so far

# Get the existing DboSession

set lSession $::DboSession_s_pDboSession
DboSession -this $lSession

# Create a DboState

set lStatus [DboState]

# Build a test directory underneath the Capture workspace

set workspace [::orcad::startpage::getCapWorkspacePath]
set projectsDir [file join $workspace "projects"]
set testDir [file join $projectsDir "DboTest"]

file mkdir $testDir

# Define the design name/path

set designPath [file join $testDir "DboTest.dsn"]
set rootName "DboTest"

# Create CString objects for the CreateDesign API

set designNameCString [DboTclHelper_sMakeCString]
DboTclHelper_sSetCString $designNameCString $designPath

set rootNameCString [DboTclHelper_sMakeCString]
DboTclHelper_sSetCString $rootNameCString $rootName

# Create the DboDesign

set lDesign [$lSession CreateDesign  $lStatus  $designNameCString   $rootNameCString]

# Get the root DboSchematic

set lRootSchematic [DboDesign_GetRootSchematic  $lDesign  $lStatus]

# Create the first schematic page

set pageNameCString [DboTclHelper_sMakeCString]
DboTclHelper_sSetCString $pageNameCString "Page 1"

set lPage [$lRootSchematic NewPage  $lStatus  $pageNameCString]

# Save the Dbo design

DboSession_SaveDesign $lSession $lDesign

although this saves the design file it does not save it as an opj file as well also there is no file view or hierarchical view in the capture window. 

i have to exit out of capture and load the design file this creates the opj file and also creates the view window with the file and hierarchical view 

Is there anyone out there that may know what i am doing wrong

Im doing the code in bits and pieces the end result is a kicad file importer for not only capture but later for pcb

Im doing this because kicad imports Altium Binary and CadStar binary format files and also has a pretty good gerber to pcb reverse engineering tool so i can save legacy files that we have lost the design tools for

  • Sign in to reply
  • 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.

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

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