Thursday, January 08, 2009     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: Moving an object with axlTransformObject
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
Geoffm
Posts: 0
Online: User is Offline
4/06/2006 8:18 AM  

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!

fxf
Posts: 43
Online: User is Offline
4/06/2006 12:08 PM  

The move option expects a list of two floating point arguments not a string.
A string is produced by strcat. Also I don't think you want to round your coordinate
calculation.

The following should do it:
 deltaX = newlocationX - car(comp->xy)
 deltaY =  newlocationY - car(cdr(comp->xy))
 
 axlTransformObject(comp ?move list(deltaX deltaY))

Geoffm
Posts: 0
Online: User is Offline
4/06/2006 12:26 PM  
Your solution worked, fxf!

I guess you don't need the comma between x and y values as in the cadence example.  Also, you used "list" instead of '. That was the only thing I didn't try.

Thanks again.
fxf
Posts: 43
Online: User is Offline
4/07/2006 4:42 AM  

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)


Geoffm
Posts: 0
Online: User is Offline
4/12/2006 12:00 PM  
I was always a bit hazy about, the difference between ' and List. Thanks for the input.
Posting to forums is available to community members only.
Login or Register

Forums > Silicon-package-board > Shared code - SKILL > Moving an object with axlTransformObject


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.