• 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. Custom IC SKILL
  3. dbCreateVia() questions: default versus override params

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 15439
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

dbCreateVia() questions: default versus override params

frogconsultant
frogconsultant over 13 years ago

I am building a procedure using the parameters of the object Via. I am changing the overrideParams of concern in order to increase or decrease the parameter value. The issue I have and I am not understanding is that when I am arriving to the default value of the parameter after decrease the value with the overrideParams, I can not get out i.e. increase or decrease this parameter anymore as describe in my little procedure.

Does someone have the same issue?

How could I get out of this default value lock?

procedure( viasColumnsDown()
    viewLyId = geGetEditCellView()
    Selecedtset = geGetSelectedSet()
    foreach( Obj Selecedtset
        if( (Obj~>objType == "stdVia" ) then
            paramNames='("cutLayer" "cutWidth" "cutHeight" "cutRows" "cutColumns"
                "cutSpacing" "layer1Enc" "layer2Enc" "layer1Offset" "layer2Offset"
                "originOffset" "imp1Enc" "imp2Enc" )
            default = mapcar('list paramNames Obj->viaHeader->viaDef->params)
            override = Obj->viaHeader->overrideParams

           v1 = dbCreateVia(viewLyId via12Id Obj->xy "R0"
                list(list("cutColumns" cadr(assoc("cutColumns" override))-1)  ))
            dbDeleteObject( Obj )
        ) ;if
        if( (v1 != nil) then
            geSelectObject( v1 )
        ) ;if
    );foreach
);procedure

This post could be a complement of similar post but as it is a new question I have posted as a brand new post.

Thanks in advance for your help,

Fabian

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Fabian,

    Try this:

    procedure( viasColumnsDown()
      let((selectedSet paramNames default override newColumns)
        paramNames='("cutLayer" "cutWidth" "cutHeight" "cutRows" "cutColumns"
            "cutSpacing" "layer1Enc" "layer2Enc" "layer1Offset" "layer2Offset"
            "originOffset" "imp1Enc" "imp2Enc" )
        selectedSet = geGetSelectedSet()
        foreach( Obj selectedSet
            when( Obj~>objType == "stdVia"
                ;------------------------------------------------------------
                ; Convert defaults to an assoc list 
                ;------------------------------------------------------------
                default = mapcar('list paramNames Obj->viaHeader->viaDef->params)
                override = Obj->viaHeader->overrideParams
                newColumns=
                    ;--------------------------------------------------------
                    ; Constrain the value to be greater or equal to 1
                    ;--------------------------------------------------------
                    max(1
                        cadr(
                            ;------------------------------------------------
                            ; If there's a value in the overrideParams, use that,
                            ; otherwise take the default
                            ;------------------------------------------------
                            assoc("cutColumns" override) ||
                            assoc("cutColumns" default)
                        )-1
                    )
                ;------------------------------------------------------------
                ; Replace the property, rather than deleting the via and re-adding
                ;------------------------------------------------------------
                dbReplaceProp(Obj "cutColumns" 'int newColumns)
            ) ; when
        );foreach
        t
      )
    );procedure

     

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Fabian,

    Try this:

    procedure( viasColumnsDown()
      let((selectedSet paramNames default override newColumns)
        paramNames='("cutLayer" "cutWidth" "cutHeight" "cutRows" "cutColumns"
            "cutSpacing" "layer1Enc" "layer2Enc" "layer1Offset" "layer2Offset"
            "originOffset" "imp1Enc" "imp2Enc" )
        selectedSet = geGetSelectedSet()
        foreach( Obj selectedSet
            when( Obj~>objType == "stdVia"
                ;------------------------------------------------------------
                ; Convert defaults to an assoc list 
                ;------------------------------------------------------------
                default = mapcar('list paramNames Obj->viaHeader->viaDef->params)
                override = Obj->viaHeader->overrideParams
                newColumns=
                    ;--------------------------------------------------------
                    ; Constrain the value to be greater or equal to 1
                    ;--------------------------------------------------------
                    max(1
                        cadr(
                            ;------------------------------------------------
                            ; If there's a value in the overrideParams, use that,
                            ; otherwise take the default
                            ;------------------------------------------------
                            assoc("cutColumns" override) ||
                            assoc("cutColumns" default)
                        )-1
                    )
                ;------------------------------------------------------------
                ; Replace the property, rather than deleting the via and re-adding
                ;------------------------------------------------------------
                dbReplaceProp(Obj "cutColumns" 'int newColumns)
            ) ; when
        );foreach
        t
      )
    );procedure

     

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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