• 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 PCB Editor
  3. Skill minimum

Stats

  • State Verified Answer
  • Replies 1
  • Subscribers 159
  • Views 4044
  • Members are here 0
More Content

Skill minimum

ivy372
ivy372 over 1 year ago

Hi Sir,

Skill > foreach(other, Oth_refdes
more> PS_DRC_refdes = setof(drc, PAD_SKT_ERROR_List, member(other, drc~>violations~>parent~>parent~>refdes))
more> PS_DRC_segment = flatten(PAD_SKT_ERROR_List~>violations~>parent ~>segments ~>startEnd)
more> GF_DRC_pin = flatten(PS_DRC_refdes ~>violations~>number)
more> PIN_DRC = setof(drc, unique(flatten(PS_DRC_refdes~>violations)), rexMatchp("pin" drc~>objType))
more> a = min(mapcar( 'axlDistance PS_DRC_refdes~>xy PIN_DRC~>xy))
more> println(a) )
(2.521049 2.098455)
(3.131717 2.708994 3.143986)
(3.786242)
(1.34828)

I want to get each minimum value of the foreach loop

But I get the error as below~


Skill > foreach(other, Oth_refdes
more> PS_DRC_refdes = setof(drc, PAD_SKT_ERROR_List, member(other, drc~>violations~>parent~>parent~>refdes))
more> PS_DRC_segment = flatten(PAD_SKT_ERROR_List~>violations~>parent ~>segments ~>startEnd)
more> GF_DRC_pin = flatten(PS_DRC_refdes ~>violations~>number)
more> PIN_DRC = setof(drc, unique(flatten(PS_DRC_refdes~>violations)), rexMatchp("pin" drc~>objType))
more> (foreach (x y) PS_DRC_refdes PIN_DRC
more> pitch = axlDistance(x~>xy y~>xy)
more> minPitch = if(minPitch, min(minPitch, pitch), pitch)
more> println(minPitch) ))
E- *Error* min: can't handle min((2.521049 2.098455) 2.521049)
ERROR

How can I fix the error code?

Thanks~

Thanks~

  • Sign in to reply
  • Cancel
  • ivy372
    +1 ivy372 over 1 year ago

    Why can't get the the minmun value?

    Skill > foreach(other, Oth_refdes
    more> PS_DRC_refdes = setof(drc, PAD_SKT_ERROR_List, member(other, drc~>violations~>parent~>parent~>refdes))
    more> PS_DRC_segment = flatten(PAD_SKT_ERROR_List~>violations~>parent ~>segments ~>startEnd)
    more> GF_DRC_pin = flatten(PS_DRC_refdes ~>violations~>number)
    more> PIN_DRC = setof(drc, unique(flatten(PS_DRC_refdes~>violations)), rexMatchp("pin" drc~>objType))
    more> pitch = mapcar( 'axlDistance PS_DRC_refdes~>xy PIN_DRC~>xy)
    more> minpitch = min(pitch)
    more> println(minpitch) )
    (2.521049 2.098455)
    (3.131717 2.708994 3.143986)
    (3.786242)
    (1.34828)

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject 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