Home > Community > Forums > PCB Design > Align tool

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Align tool 

Last post Sat, Apr 28 2012 9:27 AM by Silver John. 19 replies.
Started by Silver John 09 Aug 2011 01:13 PM. Topic has 19 replies and 7194 views
Page 1 of 2 (20 items) 1 2 Next >
Sort Posts:
  • Tue, Aug 9 2011 1:13 PM

    • Silver John
    • Top 150 Contributor
    • Joined on Sun, Apr 10 2011
    • -, Belarus
    • Posts 50
    • Points 965
    Align tool Reply

    Duplicate post in this forum, maybe it's more the right place. (It was posted to a PCB SKILL forum)

    Present to you the tools to align objects on PCB.
    Welcom for comments, bugs, suggestions.
    Questions?
    Who wants to can join to development.

    Code in HG repository: https://bitbucket.org/Kapustin/align
    For download go to the download tab. For install view readme.txt.

     How it looks:
    Align tool UI

    • Post Points: 140
  • Tue, Aug 9 2011 7:48 PM

    • redwire
    • Top 10 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 875
    • Points 13,480
    Re: Align tool Reply

     Looks nice!  Will comment more once I have had a chance to try it out.

    • Post Points: 5
  • Fri, Aug 12 2011 12:46 AM

    • Welcome04
    • Not Ranked
    • Joined on Wed, Aug 6 2008
    • Posts 8
    • Points 115
    Re: Align tool Reply
    Hi,

    I am download the Kapustin-align-tip.tar.gz and is not working for me the error as below:

    E- *Error* eval: unbound variable - _oopsAlias

    Can the skill code use for APD?I am running it on Linux.

    Pls help.

    Regards
    Elaine
    • Post Points: 20
  • Fri, Aug 12 2011 1:42 AM

    • Silver John
    • Top 150 Contributor
    • Joined on Sun, Apr 10 2011
    • -, Belarus
    • Posts 50
    • Points 965
    Re: Align tool Reply

     Hi.

    What revision are you got, what steps for reproduce?

    Have you defined alias for "oops" command? 

    I didn't test for Linux, but I seems that should work ...

    For APD worked, but I was not going a full testing, and didn't test last revisions.

     

    PS I think I see where the error...

    • Post Points: 5
  • Fri, Aug 12 2011 2:09 AM

    • Welcome04
    • Not Ranked
    • Joined on Wed, Aug 6 2008
    • Posts 8
    • Points 115
    Re: Align tool Reply
    Hi John,

    I am using APD 16.3S034

    I did not defined alias for "oops"command.

    1.The command prompt also appear like this after finishing launching the APD.
    0 ==== ("move" nil (("&Align" "align")))
    0 ==== ("move" nil (("&Align" "align")))

    2.The pull down menu have 2 edit, see attached.

    3.Skill > load("align_do.il")
    function onTop redefined
    function doTop redefined
    function doMoveTop redefined
    function onBottom redefined
    function doBottom redefined
    function doMoveBottom redefined
    function onLeft redefined
    function doLeft redefined
    function doMoveLeft redefined
    function onRight redefined
    function doRight redefined
    function doMoveRight redefined
    function onCenterH redefined
    function doCenterH redefined
    function moveToHorizontal redefined
    function onCenterV redefined
    function doCenterV redefined
    function moveToVertical redefined
    function onDistributeH redefined
    function doCalcStepH redefined
    function doDistributeH redefined
    function doCalcStepBetweenBoundaryH redefined
    function doDistributeGapBetweenBoundaryH redefined
    function onDistributeV redefined
    function doCalcStepV redefined
    function doDistributeV redefined
    function doCalcStepBetweenBoundaryV redefined
    function doDistributeGapBetweenBoundaryV redefined
    function onPickH redefined
    function doPickH redefined
    function onPickV redefined
    function doPickV redefined
    t

    4.Skill > load("align.il")
    E- *Error* setq/set: Variable is protected and cannot be assigned to - STORE_PLACE
    E- *Error* load: error while loading file - "align.il"
    ERROR

    5.Skill > load("align_utils.il")
    function griddedPoint redefined
    function getCurrentGrid redefined
    function maxX redefined
    function minX redefined
    function maxY redefined
    function minY redefined
    function orderByX redefined
    function comparePositionX redefined
    function orderByY redefined
    function comparePositionY redefined
    function getObjectLocation redefined
    function getPinLocation redefined
    function getObjectBBox redefined
    function getBBoxes redefined
    function getMinBBoxX redefined
    function getMaxBBoxX redefined
    function getMinBBoxY redefined
    function getMaxBBoxY redefined
    function refreshIDs redefined
    function checkForFixedObjects redefined
    function moveObject redefined
    t



    Regards
    Elaine


    • Post Points: 20
  • Fri, Aug 12 2011 2:34 AM

    • Welcome04
    • Not Ranked
    • Joined on Wed, Aug 6 2008
    • Posts 8
    • Points 115
    Re: Align tool Reply
    Hi John,

    I miss out the revision is 8240bb894958.

    Regards
    Elaine
    • Post Points: 5
  • Fri, Aug 12 2011 2:36 AM

    • Silver John
    • Top 150 Contributor
    • Joined on Sun, Apr 10 2011
    • -, Belarus
    • Posts 50
    • Points 965
    Re: Align tool Reply

     You load scripts twice. Why, I don't know. Do not do that.
    Later I add checking for this situation. (thanks for suggestion :))

    Temporary sulution for "oops" error: 
     in initHotKeys() procedure update next line:
         let( (aliases alias aliasFun _oopsAlias)

     Tell me how it helped. I can't test this solution now.

    Also you can simle defin—É alias in env file.

    • Post Points: 20
  • Fri, Aug 12 2011 3:18 AM

    • Welcome04
    • Not Ranked
    • Joined on Wed, Aug 6 2008
    • Posts 8
    • Points 115
    Re: Align tool Reply

    Hi John,

    I did not change the skill code but

    I load the skill code manually on the command prompt, the align tool menu pop out but the error still exit as below:
    Skill > align
    E- *Error* eval: unbound variable - _oopsAlias
    ERROR

    I will test out later, see whether the option of Align tools is working.Will let you know once I found anything strange.
    The pull down menu has no more align command if I manually load it.If I load it automatic on the apd.ilint, the pull down me having two align command.

    Thanks have a nice weekend.

    Regards
    Elaine

     


    • Post Points: 20
  • Fri, Aug 12 2011 10:10 AM

    • Silver John
    • Top 150 Contributor
    • Joined on Sun, Apr 10 2011
    • -, Belarus
    • Posts 50
    • Points 965
    Re: Align tool Reply

    Fixed: *Error* eval: unbound variable - _oopsAlias.

    Get revision: 59:f5873beef39b.

    About double loading, I tried, but not reproduce it.

    • I load by apd.ilinit
    • I load by allegro.ilinit
    • I use both apd.ilinit and allegro.ilinit

    Now I'm using allegro.ilinit for load scripts in APE and APD.

    • Post Points: 5
  • Sun, Aug 14 2011 6:18 PM

    • Welcome04
    • Not Ranked
    • Joined on Wed, Aug 6 2008
    • Posts 8
    • Points 115
    Re: Align tool Reply
    Hi Silver John,

    Thanks, it works for me now.

    Regards
    Elaine
    • Post Points: 5
  • Mon, Aug 15 2011 12:53 AM

    • Welcome04
    • Not Ranked
    • Joined on Wed, Aug 6 2008
    • Posts 8
    • Points 115
    Re: Align tool Reply
    Hi John,

    This skill core is not working on APD16.5 P3.

    the error as beIow:
    E- Failed to open form align.form.
    E- *Error* axlFormSetField: argument #1 should be any user-defined (other) type (type template = "otg") - nil

    Regards
    Elaine
    • Post Points: 20
  • Mon, Aug 15 2011 3:57 AM

    • Silver John
    • Top 150 Contributor
    • Joined on Sun, Apr 10 2011
    • -, Belarus
    • Posts 50
    • Points 965
    Re: Align tool Reply

     In HF2 worked, and in HF3 appears error?

    Linux?

    Which steps to reproduce?

    PS Don't past (remove) previous message in reply, please. It pollutes the forum.

    • Post Points: 5
  • Mon, Aug 15 2011 5:44 PM

    • Welcome04
    • Not Ranked
    • Joined on Wed, Aug 6 2008
    • Posts 8
    • Points 115
    Re: Align tool Reply
    Hi John,

    It works now,So sorry, I did not place the  form and icon files into the correct folders.

    Thanks alot.

    Regards
    Elaine
    • Post Points: 5
  • Tue, Aug 30 2011 8:41 AM

    • steve
    • Top 10 Contributor
    • Joined on Fri, Jul 18 2008
    • Woking, Surrey
    • Posts 1,172
    • Points 19,005
    Re: Align tool Reply

    I have been playing with this for a while and think it's very good. One comment though is that it appears to hijack the align command from the Placement Application Mode, select components and RMB - Align. Don't think that is a good idea. Maybe a tweak is required to keep the original commands intact......

    • Post Points: 20
  • Tue, Aug 30 2011 12:31 PM

    • Silver John
    • Top 150 Contributor
    • Joined on Sun, Apr 10 2011
    • -, Belarus
    • Posts 50
    • Points 965
    Re: Align tool Reply
    Yes, the command replaced. After a while I'll refactor and this problem will disappear.
    While you can do it yourself.
    Replace:
    axlCmdRegister( "align" 'align  ?cmdType "interactive" ?doneCmd 'alignDone ?cancelCmd 'alignCancel )
    to
    axlCmdRegister( "aln" 'align  ?cmdType "interactive" ?doneCmd 'alignDone ?cancelCmd 'alignCancel )
    and respectively
    axlUIMenuRegister( "move" '( ("&Align" "align") ) )
    to
    axlUIMenuRegister( "move" '( ("&Align" "aln") ) )
    • Post Points: 5
Page 1 of 2 (20 items) 1 2 Next >
Sort Posts:
Started by Silver John at 09 Aug 2011 01:13 PM. Topic has 19 replies.