• 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. Moving an object with axlTransformObject

Stats

  • Replies 4
  • Subscribers 158
  • Views 13808
  • Members are here 0
More Content

Moving an object with axlTransformObject

archive
archive over 19 years ago

Hello,

I am having trouble getting data into the axlTransformObject command.

I am using concat to join the x value, a comma, and the y value, and then insert the result into the transform object line, but it's separating the first number with \'s. I guess this means there is something I don't know about concat.


when i run the program printf prints:

compLoc (9865.0 8195.0)  2135  1805
Concat \2\1\3\5\,1805
W- *WARNING* (axlTransformObject): ?move option requires a delta x/y location

here is an example from the Cadence skill guide:
   axlTransformObject(ldbid, ?move '(100.0, 0.0))


see my code below...

(defun MoveIt ()

   Plist=axlGetSelSet()
   axlShell("Done")
  
  ;pick new location
  newlocationX=12000
  newlocationY=10000
  
  ;printf("Plist  %L \n" Plist)
  
  (foreach comp Plist
  
      ;printf("compLoc %L " comp->xy)
      deltaX=round(newlocationX)-round(car(comp->xy))
      deltaY=round(newlocationY)-round(car(cdr(comp->xy)))
   
      printf(" %n  %n \n" deltaX deltaY)
      deltaXY=concat(deltaX "," deltaY)
      printf("Concat %L \n" deltaXY)
      axlTransformObject(comp, ?move 'deltaXY)

  );end for
    
);


hope somebody can help!


Originally posted in cdnusers.org by Geoffm
  • Sign in to reply
  • Cancel
Parents
  • archive
    archive over 19 years ago


    Commas are optional and allow for a "C" programming style

    The difference between list and quote (') is that lists causes evaluation while
    the quote doesn't. To show this with a simpe example.

    Assuming:
        dx=10
        dy=20

    Do the following :
          xy = list (dx dy)
    result: xy = (10 20)

    While
          xy = '(dx dy)
    result: xy = (dx dy)

    You can also use the shorthand colon notation in place of list for 2 elements so
          xy=dx:dy
    result: xy = (10 20)



    Originally posted in cdnusers.org by fxf
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • archive
    archive over 19 years ago


    Commas are optional and allow for a "C" programming style

    The difference between list and quote (') is that lists causes evaluation while
    the quote doesn't. To show this with a simpe example.

    Assuming:
        dx=10
        dy=20

    Do the following :
          xy = list (dx dy)
    result: xy = (10 20)

    While
          xy = '(dx dy)
    result: xy = (dx dy)

    You can also use the shorthand colon notation in place of list for 2 elements so
          xy=dx:dy
    result: xy = (10 20)



    Originally posted in cdnusers.org by fxf
    • 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