• 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. Zooming problems; getting inconsistent zoom results using...

Stats

  • Replies 6
  • Subscribers 158
  • Views 15222
  • Members are here 0
More Content

Zooming problems; getting inconsistent zoom results using axlZoomToDbid

EvanShultz
EvanShultz over 16 years ago

Hi all,

I am working on my first SKILL program, so please don't bloody me too much if I am doing something silly :) I haven't written much code as I am a hardware engineer, but I'm the only person at a small company who's looked at SKILL so here I am. I have looked at several of the SKILL programs on SourceLink and I was quickly able to get a basic feel for the programs and understand what several of them are doing.

 

I want to zoom in on an object, so I reached for the apparently perfect axlZoomToDbid command using:

axlZoomToDbid(<object> t)

It wants to work as I am zooming in on the objects, but the amount of zooming varies greatly. The description of the command says the object will fill about 20% of the screen. For me, some components fill up the screen entirely and others are very small. But the component is definitely being centered on the screen, so I'm confident the command is working at some level.

 Can anyone else confirm this behavior? Has anyone used zxlZoomToDbid before? Perhaps it is related to another setting, like User Prefs > Ui folder > Zoom folder > buttonfactor which were added to PCB Editor after axlZoomToDbid was introduced? I tried changing the settings I thought might help but I didn't find the right one.

 

In lieu of using that seemingly simple command, I calculated coordinates a bit around the object's extents and saved the 4 points as variables x1, y1, x2, and y2. I thought I could use those coordinates and axlShell to zoom by points. But I wasn't able to pass along the variables using either:

;axlShell("zoom points; pick x1 y1; pick x2 y2") OR ;axlShell("zoom points; pick %f %f; pick %f %f" x1 y1 x2 y2)

It seems like one of the above ought to work, but it doesn't. I know I've got the right coordinate data in the variables because when I run the second line above I see the correct coordinates in the Command Window, but those coordinates aren't getting into the zoom points command.

 

I'd prefer to use axlZoomToDbid if possible, since it's a shiny new (well, since 15.0) command and it takes 4 less lines of code, but if anyone else can get my second option working or has a completely different solution please let me know. Thank you!

  • Sign in to reply
  • Cancel
Parents
  • natebizu
    natebizu over 16 years ago

    The reason axlZoomToDbid seems to not zoom in enough (for components) is that it uses the bounding box of the entire component. This includes dimensioning and text (if they exist) on non-visible layers.

    I suggest you get the dbid of the place bound shape and zoom to that dbid, but highlight the entire component. There is nothing that says the object needs to be visible to zoom to it.

    Hope this helps...

    Nate

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • natebizu
    natebizu over 16 years ago

    The reason axlZoomToDbid seems to not zoom in enough (for components) is that it uses the bounding box of the entire component. This includes dimensioning and text (if they exist) on non-visible layers.

    I suggest you get the dbid of the place bound shape and zoom to that dbid, but highlight the entire component. There is nothing that says the object needs to be visible to zoom to it.

    Hope this helps...

    Nate

    • 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