Present to you the tools to align objects on PCB.
Welcom for comments, bugs, suggestions.
Who wants to can join to development.
Code in HG repository: https://bitbucket.org/Kapustin/align
For download go to the download tab.
How better implement onPickV() and doPickH()? Now, if put coordinate in consol, we can hit to some object...
Icons not works in Allegro 15.x
axlUIMenuRegister() not work in Allegro 15.x
It is necessary to check the English expressions. Eg "Align by RIGHT boundary".
Make a simple mechanism to install. The installer or hold everything in one il-file or ...
And how it looks:
I tried this, and it works great ! Only one thing, but not important.
The issue was on a couple of my parts I did not have a pin1, (I had pin A and K) it exited with error (Symbol "Cr54" has no pin 1.E- *Error* max: can't handle max(nil -1000000.0). So maybe have a pin name selection box ? But of course when you are selecting a group of components they all won't be pin A / K ... it will be a mix of different pin numbers. So this may not be possible.
In reply to ConnectPCB:
Added field for pin number/name (text field).
If pin not found then you will got warning message, and object will be aligned/bound by body center.
Currently we are using "out of the box" Allegro Align command available in Placement mode, works just fine.
Long time ago we used my simple code with simple form but I did figured out UNDO.
Basically you have to capture all "DOs" xy in a list to be able to "UNDO".
See code attached
In reply to Helen:
Hi, Helen. Thanks for your concern.But in your script "undo" for only the last action, and only in the script. I implemented the "Oops", by using standart axlDBTransactionXXXX functions.I was referring to a global, external mechanism UNDO. We recently discussed this problem (http://www.cadence.com/community/forums/T/19737.aspx), and the solution is not visible.
PS Yes, I also used a standard command Align, some scripts other authors... Then wrote my own script.
axlUIMenuRegister() was new in 16.3 and will hence not work before that.
Don't know if it was updated into 16.2 / 16.01 /16.0 ISR stream, but sure it was not added to 15.x
In reply to Ejlersen:
Yes, I was told. In the 15th version, menu does not work (error message) and no icons.
By the way, on menu.axlUIMenuRegister() I don't like. It prints a useless message on the console: 0 ==== ("move" nil (("&Align" "align"))).How suppress this message, or use another function for insertion new menu item?
In reply to Silver John:
I'm seeing the same message and would like to know how to get rid of it.
Script was updated. Current revision 0.9.3.
Due to recent revisions, to support the APE v15.x I had a few questions.I disabled the function axlGetFunckey for version less 16.3 and axlDBGridGet - less v15.7.1 axlDBGridGet a really appeared in version 15.7?2 What other functions are not lacking in v15.x (and which version they appeared)?
I just downloaded it into Orcad Layout V16.5 and already like what I see.
I have yet to discover all that it can do but will save me time in the future.
Have you been able to right any script to allow users to rotate parts while in the move command?
In reply to alanf:
Script works in Layout!? o_O
For rotation (in APE) you can use standart command "rotate".
Only add hotkey to env-file (for you convenience):
funckey r rotatefunckey R rotate
You could also use the iangle command
funckey r iangle 90 to rotate 90 degree each time you press r
or if you need finer adjustments set the angle to something less or use uppercase R for another angle increment
Enough offtopic, guys.
Ole, you have some experience, maybe you answer my questions?