• 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. Passing Values in axlSelectByName from infile

Stats

  • Replies 2
  • Subscribers 160
  • Views 13279
  • Members are here 0
More Content

Passing Values in axlSelectByName from infile

vimaldevlpr
vimaldevlpr over 5 years ago

Hi,

I need one help from passing values  infile data to axlSelectByName  its not passing it show me nil can anyone please help me out I'll share my code below.

code:

procedure(clineAirgap()
in1 = infile("Netlist.lst")
a = nil
  while(gets(cseg1 in1)
  a = sort(cons(cseg1 a) ' nil)
  )
  close(in1)
      cseg2 = axlSelectByName("NET", a)
  if(cseg2 then
   axlSetFindFilter(?enabled `("NOALL" "CLINESEGS") ?onButtons `("CLINESEGS"))
   cseg3 = axlGetSelSet(axlAddSelectAll())
   val = atoi(axlUIPrompt("Enter the minimum airgap :"))
   if(cseg3 then
    foreach(cseg4 cseg2
      println(cseg4 ->net ->name)
     when(cseg4->objType == "path"
      foreach(cseg6 cseg4->segments
       foreach(cseg5 cseg3       
        when(equal(cseg6->layer cseg5->layer)
         (data = (axlAirGap cseg6 cseg5 (cseg5->layer)))
          when(data
           (_AirGap = (lastelem data))
            if(val > _AirGap  then
             axlHighlightObject(cseg6)
             println("yes")   
            )
           )
         )       
       
       )      
      )
     )
    
    )   
   )
  )
)

  • Sign in to reply
  • Cancel
Parents
  • B Bruekers
    B Bruekers over 5 years ago

    Do you have an example of the "Netlist.lst" data file? If it contains a list of netnames then you need to do something like this to read all the lines:

    while(gets(cseg1 in1)
      cseg1 = car(parseString(cseg1 "\n"))
      when(cseg1 push(cseg1 a))
    )

    The parseString is needed to get rid of the newlines which are possibly in the "Netlist.lst" file.

    Further i would not use a sort with each line read. It is better to sort the list at the moment that you are done with reading the complete file.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to B Bruekers

    Kindly thanks for your reply.. values passing fine but while checking in airgap its shows me nil. I want to check the input cline segment with every cline segment present in the board following code attached below could you please check it.

    procedure(clineAirgap()
    in1 = infile("Netlist.lst")
    a = nil
      while(gets(cseg1 in1)
      cseg1 = car(parseString(cseg1 "\n"))
      when(cseg1 push(cseg1 a))
      )
      close(in1)
          cseg2 = axlSelectByName("NET", a)
      if(cseg2 then
       axlClearSelSet()
       axlSetFindFilter(?enabled `("NOALL" "CLINESEGS") ?onButtons `("CLINESEGS"))
       cseg3 = axlGetSelSet(axlAddSelectAll()) 
       val = atoi(axlUIPrompt("Enter the minimum airgap :"))
       if(cseg3 then
        foreach(cseg4 cseg2 ->branches
         foreach(chk cseg4 ->children
         when(chk->objType == "path"
          foreach(cseg6 chk
           println("yes1")
           foreach(cseg5 cseg3       
            when(equal(cseg6->layer cseg5->layer)
             (data = (axlAirGap cseg6 cseg5 (cseg6->layer)))
              when(data
               (_AirGap = (lastelem data))
                if(val > _AirGap  then
                 axlHighlightObject(cseg6)
                 println("yes")   
                )
               )
             )       
           
           )      
          )
         )
         )
        )   
       )
      )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to B Bruekers

    Kindly thanks for your reply.. values passing fine but while checking in airgap its shows me nil. I want to check the input cline segment with every cline segment present in the board following code attached below could you please check it.

    procedure(clineAirgap()
    in1 = infile("Netlist.lst")
    a = nil
      while(gets(cseg1 in1)
      cseg1 = car(parseString(cseg1 "\n"))
      when(cseg1 push(cseg1 a))
      )
      close(in1)
          cseg2 = axlSelectByName("NET", a)
      if(cseg2 then
       axlClearSelSet()
       axlSetFindFilter(?enabled `("NOALL" "CLINESEGS") ?onButtons `("CLINESEGS"))
       cseg3 = axlGetSelSet(axlAddSelectAll()) 
       val = atoi(axlUIPrompt("Enter the minimum airgap :"))
       if(cseg3 then
        foreach(cseg4 cseg2 ->branches
         foreach(chk cseg4 ->children
         when(chk->objType == "path"
          foreach(cseg6 chk
           println("yes1")
           foreach(cseg5 cseg3       
            when(equal(cseg6->layer cseg5->layer)
             (data = (axlAirGap cseg6 cseg5 (cseg6->layer)))
              when(data
               (_AirGap = (lastelem data))
                if(val > _AirGap  then
                 axlHighlightObject(cseg6)
                 println("yes")   
                )
               )
             )       
           
           )      
          )
         )
         )
        )   
       )
      )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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