• 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. OrCAD Capture CIS: Export BOM via TCL

Stats

  • State Suggested Answer
  • Replies 5
  • Answers 1
  • Subscribers 12
  • Views 4348
  • Members are here 0
More Content

OrCAD Capture CIS: Export BOM via TCL

ggeorgg
ggeorgg over 2 years ago

Hello, 

I want to get the BOM for one or multiple CIS variants via TCL to be able to push it to SAP directly from OrCAD.

I found the "CVariant_GetPartsFromAllVariants" method, but I need some assistance on how I can loop over all its elements. Here is what I have already tried:

set DboDesign [GetActivePMDesign]
set CISDesign [CPartMgmt_GetCisDesign $DboDesign]
set CVariantGroupsContainer [CISDesign_GetGroupsContainer $CISDesign]
set QUIntArrayPartsFromAllVariants [QUIntArray]
set int [CVariant_GetPartsFromAllVariants $CVariantGroupsContainer $QUIntArrayPartsFromAllVariants]

set QUIntArrayUpperBound [QUIntArray_GetUpperBound $QUIntArrayPartsFromAllVariants]
set UInt [QUIntArray_GetAt $QUIntArrayPartsFromAllVariants $QUIntArrayUpperBound]
set UInt [QUIntArray_ElementAt $QUIntArrayPartsFromAllVariants $QUIntArrayUpperBound]

CISTclHelper_sGetIntFromUINT $UInt

It seems the last command returns the OccID of the "last" part in the design. Now I would like to iterate over all elements in $QUIntArrayPartsFromAllVariants, but I need to somehow create an INT_PTR manually. How can I do that?

Similar problem with the method "CNewBOm_GetAllParts"

set BOMVariantContainer [CISDesign_GetBOMVariantContainer $CISDesign]
set QUIntArrayAllParts [QUIntArray]
set int [CNewBOm_GetAllParts $BOMVariantContainer $QUIntArrayAllParts]
set QUIntArrayUpperBound [QUIntArray_GetUpperBound $QUIntArrayAllParts]
set UInt [QUIntArray_GetAt $QUIntArrayAllParts $QUIntArrayUpperBound]
set UInt [QUIntArray_ElementAt $QUIntArrayAllParts $QUIntArrayUpperBound]

CISTclHelper_sGetIntFromUINT $UInt

So the question is, how can I iterate a QUIntArray? Or is there currently no way to iterate those type of arrays and I have to use a different method? Which one would be suited/best?

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