• 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 Capture CIS
  3. Reset CIS group/subgroup link status

Stats

  • State Not Answered
  • Replies 2
  • Subscribers 43
  • Views 1110
  • Members are here 0
More Content

Reset CIS group/subgroup link status

ggeorgg
ggeorgg over 1 year ago

Dear community, 

sometimes it happens, that we execute "Update all part status" on groups/subgroups in the part manager. When the database has changed, after the last "Update all part status" operation on the Core Design, then the parts in the group/subgroups will be marked as if they were linked to a different part than in the core, even though they have the same Part Number.

In the part manager itself, I could remove the part from the group and add it again, but it is anyoing because I have to look up first, if the link was done on purpose or if it happend accidentially by the "Update all part status" operation.

So the question is: Is there a way to reset the link status of parts in the part manager in group/subgroups via TCL if the Part Number of the part in the group/subgroup is the same as in the core?

Best would be to have a script which loops all groups/subgroups and then in each group/subgroup it has to loop over all linked parts and compare the Part Number to the Part Number of the same OccId in the core. If it matches, remove the "link" so that this occId is connects again to the Core part.

Best regards

Georg

  • Sign in to reply
  • Cancel
Parents
  • CadAP
    0 CadAP over 1 year ago

    HI Georg,

    I am sharing below tcl code as per my understanding , Please do modify incase you need to add more commands.

    set lDesign [GetActivePMDesign]
    set lCISDesign [CPartMgmt_GetCisDesign $lDesign]
    set StingCs [CISTclHelper_sMakeCStringArray]

    set variantBomCNewBOm [$lCISDesign GetBOMVariantContainer]
    set VariantBomCount [$variantBomCNewBOm GetBomCount]


    $lCISDesign GetGroupsContainer
    set cVar [$lCISDesign GetGroupsContainer]
    puts [$cVar GetGroupCount]

    $cVar GetAllGroups $StingCs
    # puts "$StingCs"
    set gname [CISTclHelper_sGetCString $StingCs 0]
    set gname1 [CISTclHelper_sGetCString $StingCs 1]
    # puts $gname
    set Gname [DboTclHelper_sGetConstCharPtr $gname]
    puts $Gname

    set lPart1s [CISTclHelper_sMakeCUIntArray]
    set lParts [CISTclHelper_sMakeCUIntArray]
    set lPartsCount [CISTclHelper_sGetCUIntArraySize $lPart1s]
    # puts $lPartsCount
    $lCISDesign GetCommonParts $lParts
    set lPartsCount1 [CISTclHelper_sGetCUIntArraySize $lParts]

    $cVar GetSubGroupCount $gname
    $cVar GetPartsFromGroup $gname $lPart1s

    set lPartsCount [CISTclHelper_sGetCUIntArraySize $lPart1s]
    # puts $lPartsCount
    puts "=====Group:=$Gname====="
    for {set y 0} {$y < $lPartsCount} {incr y} {

    set partNumber [DboTclHelper_sMakeCString "Part_Number"]

    set lPartId [CISTclHelper_sGetUInt $lPart1s $y]
    # puts $lPartId
    if {$lPartId != 0 } {
    set lSubGroupName [DboTclHelper_sMakeCString ""]
    set lUINTPartId [CISTclHelper_sGetUINTFromInt $lPartId]
    set lCISInstOcc [$lCISDesign GetPartOccForID $lUINTPartId]
    set lCispatInst [$lCISInstOcc GetOwningCISPartInst]
    # puts $lCispatInst
    set varPart [$lCISInstOcc GetPartProp $partNumber]
    puts "Varinat_Part_NUmber == [DboTclHelper_sGetConstCharPtr $varPart]"
    set corePart [$lCispatInst GetCoreDesignProp $partNumber ]
    # puts $corePart
    set lRefDes [$lCISInstOcc GetPartRefDes]
    puts "Core_Part_Number:== [DboTclHelper_sGetConstCharPtr $corePart] "
    if {[DboTclHelper_sGetConstCharPtr $varPart] ne [DboTclHelper_sGetConstCharPtr $corePart] } {

    $lCispatInst ResetLinkSetting
    }

    # set lRefDes [$lRefDes GetRefDes]
    # set lRefDes [DboTclHelper_sMakeCString $lRefDes]
    # set lRefDesStr [DboTclHelper_sGetConstCharPtr $lRefDes]
    # puts $lRefDesStr
    }

    }

    delete_CISInstOccurrence $lCISInstOcc

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • CadAP
    0 CadAP over 1 year ago

    HI Georg,

    I am sharing below tcl code as per my understanding , Please do modify incase you need to add more commands.

    set lDesign [GetActivePMDesign]
    set lCISDesign [CPartMgmt_GetCisDesign $lDesign]
    set StingCs [CISTclHelper_sMakeCStringArray]

    set variantBomCNewBOm [$lCISDesign GetBOMVariantContainer]
    set VariantBomCount [$variantBomCNewBOm GetBomCount]


    $lCISDesign GetGroupsContainer
    set cVar [$lCISDesign GetGroupsContainer]
    puts [$cVar GetGroupCount]

    $cVar GetAllGroups $StingCs
    # puts "$StingCs"
    set gname [CISTclHelper_sGetCString $StingCs 0]
    set gname1 [CISTclHelper_sGetCString $StingCs 1]
    # puts $gname
    set Gname [DboTclHelper_sGetConstCharPtr $gname]
    puts $Gname

    set lPart1s [CISTclHelper_sMakeCUIntArray]
    set lParts [CISTclHelper_sMakeCUIntArray]
    set lPartsCount [CISTclHelper_sGetCUIntArraySize $lPart1s]
    # puts $lPartsCount
    $lCISDesign GetCommonParts $lParts
    set lPartsCount1 [CISTclHelper_sGetCUIntArraySize $lParts]

    $cVar GetSubGroupCount $gname
    $cVar GetPartsFromGroup $gname $lPart1s

    set lPartsCount [CISTclHelper_sGetCUIntArraySize $lPart1s]
    # puts $lPartsCount
    puts "=====Group:=$Gname====="
    for {set y 0} {$y < $lPartsCount} {incr y} {

    set partNumber [DboTclHelper_sMakeCString "Part_Number"]

    set lPartId [CISTclHelper_sGetUInt $lPart1s $y]
    # puts $lPartId
    if {$lPartId != 0 } {
    set lSubGroupName [DboTclHelper_sMakeCString ""]
    set lUINTPartId [CISTclHelper_sGetUINTFromInt $lPartId]
    set lCISInstOcc [$lCISDesign GetPartOccForID $lUINTPartId]
    set lCispatInst [$lCISInstOcc GetOwningCISPartInst]
    # puts $lCispatInst
    set varPart [$lCISInstOcc GetPartProp $partNumber]
    puts "Varinat_Part_NUmber == [DboTclHelper_sGetConstCharPtr $varPart]"
    set corePart [$lCispatInst GetCoreDesignProp $partNumber ]
    # puts $corePart
    set lRefDes [$lCISInstOcc GetPartRefDes]
    puts "Core_Part_Number:== [DboTclHelper_sGetConstCharPtr $corePart] "
    if {[DboTclHelper_sGetConstCharPtr $varPart] ne [DboTclHelper_sGetConstCharPtr $corePart] } {

    $lCispatInst ResetLinkSetting
    }

    # set lRefDes [$lRefDes GetRefDes]
    # set lRefDes [DboTclHelper_sMakeCString $lRefDes]
    # set lRefDesStr [DboTclHelper_sGetConstCharPtr $lRefDes]
    # puts $lRefDesStr
    }

    }

    delete_CISInstOccurrence $lCISInstOcc

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • ggeorgg
    0 ggeorgg over 1 year ago in reply to CadAP

    Hi CadAP! Thanks for your code.

    I am still struggling with this issue. First of all, it looks like the code is not working at all if we are talking about subgroups, because lPartsCount is 0 when using subgroups. So I changed the DSN file to just use groups and then the for loop cycled the components in this group.

    The property name I want to compare is "PARTNUM" so I replaced "Part_Number" with this key name.

    I also changed the if condition which compared the variant part number and the core part number to use "eq" instead of "ne" because I want to reset the link if the values match. Unfortunately, it looks like "$lCispatInst ResetLinkSetting" does not have any effect. If I look into the part manager again after the code did run successfully, the green tick is still visible in the group for the component.

    Additionally, I actually would like to be able to check if the current part in the for loop is linked at all, if not, I want to skip this part and continue to the next part in the current group.

    Do you have more suggestions on how to solve this? What does the method "ResetLinkSetting" do?

    Best regards

    Georg

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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