• 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 - Skill
  3. about lines startend points

Stats

  • Replies 17
  • Subscribers 17
  • Views 14724
  • Members are here 0
More Content

about lines startend points

tennywhy
tennywhy over 7 years ago

i want get all lines start and end points on outline layer, there is the code

defun( apl ()
    let( (RLP symbPg symbPth allSymbols allSymbolss)
    ;print all lines startend point
    axlSetFindFilter(?enabled list("noall" "lines")
        ?onButtons list("noall" "lines"))
    allSymbols = axlGetSelSet(axlAddSelectAll())
    axlClearSelSet()
    foreach( everyLine allSymbols
            axlMsgPut("startis %L" everyLine->startEnd) ; it doesnt work
            ;axlMsgPut("startis %L" everyLine->?) ;checked it has startEnd properties
            ;axlMsgPut("startis %L" everyLine->??) ;checked it has startEnd properties  
            )
 ))

what's the right way ?  and in the skill UG there is a starEnd attribute as in image below. how could i do it ?

  • Cancel
  • Sign in to reply
  • eDave
    eDave over 7 years ago

    startEnd is and attribute of a line segment - not the symbol itself.

    use something like

    foreach(symbol, allSymbols

      foreach(pathObj setof(obj, symbol ->children, obj ->objType == "path")

        foreach(segment, pathObj, ends = segment ->startEnd

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • tennywhy
    tennywhy over 7 years ago in reply to eDave

    hi dave very appreciate your reply.  i tried it ,  it cant work. it's seem as there is no children attibutes, and there is no children attibutes in line attributes shown in the image above.

    i tried other attributes in the line attributes table also , cant get work still.  could you give me some moer advice please ? i have stucked here several days

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 7 years ago in reply to tennywhy

    Post your code here. I can't help if I don't know what you are doing.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • tennywhy
    tennywhy over 7 years ago in reply to eDave

    axlCmdRegister( "autoPlace" 'autoPlace)
    defun( autoPlace ()
        let( (RLP symbPg symbPth allSymbols allSymbolss)
        axlSetFindFilter(?enabled list("noall" "Lines")
            ?onButtons list("noall" "Lines"))
        allSymbols = axlGetSelSet(axlAddSelectAll())
        axlClearSelSet()
        foreach(symbol, allSymbols
             ;printf("symbol is %L" symbol) ;can be get right dbid at here
             foreach(pathObj setof(obj, symbol ->children, obj ->objType == "path")
                 ;printf("pathObj is %L" pathObj) ;nothing at here
                 foreach(segment, pathObj, ends = segment ->startEnd
                 ;printf("ends is %s" ends) ;nothing at here
                              )))
    ))

    ;========================================================

    1) this is my code , my purpose is get all lines at visible layer , and list all line segments start and end point.

    2) i have tested the symbol attributes use symbol->?? it seem as not children attributes

    3) it seem as symbol->? also displayed some attributes, what different  ->? and ->?? ,  if ->? dispalyed attributes can not be refernce directely ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 7 years ago in reply to tennywhy

    You set your find filter to "lines" and then expect to get symbols returned!

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