Home
  • Products
  • Solutions
  • Support
  • Company

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  • Products
  • Solutions
  • Support
  • Company
Community PCB Design & IC Packaging (Allegro X) Allegro X Scripting - TCL Getting Diode Name

Stats

  • State Verified Answer
  • Replies 5
  • Subscribers 11
  • Views 909
  • Members are here 0
More Content

Getting Diode Name

karthikeyank
karthikeyank 4 months ago

HI,

I was trying get the part name starts with the letter k and diode name. i can be able to retrieve the part name. i dont know how to access the diode. can anyone plz help me out.

Expected Output -

Part Name: K00_012

Diode Name: D00_012

Program:

for {set j 0} {$j < $objlength} {incr j} {
set lPage [lindex $selectedobjs $j]
set lPageNameCS [DboTclHelper_sMakeCString]
$lPage GetName $lPageNameCS
set lPageName [DboTclHelper_sGetConstCharPtr $lPageNameCS]
#puts $lPageName
set PlIter [$lPage NewPartInstsIter $lStatus]
set lPart [$PlIter NextPartInst $lStatus]
while {$lPart != $lNullObj } {
set lReferenceName [DboTclHelper_sMakeCString]
$lPart GetReference $lReferenceName
set lReferenceNameS [DboTclHelper_sGetConstCharPtr $lReferenceName]
#puts $lReferenceNameS
set firstLetter [string range $lReferenceNameS 0 0]
if {$firstLetter == "K" } {
set lOccCount [$lPart GetOccurrencesCount]
for {set i 0} {$i < $lOccCount} {incr i} {
set lOcc [$lPart GetOccurrencesAtPos $i]
set lReferenceName1 [DboTclHelper_sMakeCString]
$lOcc GetPathName $lReferenceName1
set lReferenceNameS1 [DboTclHelper_sGetConstCharPtr $lReferenceName1]
puts $lReferenceNameS1
set inpPrse [lindex [split $lReferenceNameS1 "/"] 1]
set lIter [$lPart NewPinsIter $lStatus]
set lPin [$lIter NextPin $lStatus]
while {$lPin != $lNullObj } {
set lPinName [DboTclHelper_sMakeCString]
$lPin GetPinName $lPinName
set lPinName [DboTclHelper_sGetConstCharPtr $lPinName]
if {[string first "+" $lPinName] >= 0} {

puts $inpPrse
#---How to find diode name

}
set lPin [$lIter NextPin $lStatus]
}
delete_DboPartInstPinsIter $lIter
}
}
set lPart [$PlIter NextPartInst $lStatus]
}
delete_DboPagePartInstsIter $PlIter

  • 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.

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

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