Results 1 to 4 of 4

Thread: OSNAP Dialog In LISP/DCL

  1. #1
    Active Member
    Join Date
    2004-10
    Location
    Wheat Ridge, Colorado
    Posts
    97
    Login to Give a bone
    0

    Default OSNAP Dialog In LISP/DCL

    O.K., ..., I am once again stepping forward to share my ignorance

    Like many we are having trouble with the OSNAP dialog in AutoCAD Architecture 2009. Yes, I know there are two newer versions avaiable. We will be migrating to 2011 sometime around the beginning of the year. In any case, I am trying to alleviate some pain for my users by building a usable version of the dialog. I don't think they will find my current solution that much more satisfying than what they have, as I can only get it to set one OSNAP.

    My question has to do with the best way to approach the problem. Right now, I am thinking about assigning a number to each TOGGLE for the individual OSNAPs and then calculating the total to hand to the ACTION_TILE rather than using a BOOLE function. Does that sound reasonable, or am I missing the obvious (wouldn't be the first time)?

    As always, thanks in advance,
    Attached Files Attached Files

  2. #2
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: OSNAP Dialog In LISP/DCL

    Return a list (each OSnap has a bit code), and from there you can boole it once. However, you need to make sure you are accounting for items being unchecked.

    Does this help?
    Code:
    (boole 6 (apply (function logior) lst) (getvar 'osmode))
    Actually, you might be able to just assign each item two values (0 for unchecked, bit code for checked), then just evaluate each item when the user clicks OK and set the osmode from there, forgetting all about boole.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,568
    Login to Give a bone
    0

    Default Re: OSNAP Dialog In LISP/DCL

    Not familar with AutoCAD Architecture 2009, I use Map and Civil. I'd like to offer an alternitive method. I've always modified the Object Snap Cursor Menu to display which Osnaps were toggled on.

    I added a flyout from which I can select an osnap to toggle it on/off, selecting none clears them all and EAppCNIns sets End, Apparent Intersect, Center, Node, and Insert which is what I normally use. I added a couple other toggles as well.

    Check out Object Snap Cursor Menu2009.cui attached.

  4. #4
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: OSNAP Dialog In LISP/DCL

    Great idea, Tom. I just have a LISP macro that sets my preferred ones and several assigned to programmable keys that work as overrides.

Similar Threads

  1. 2016: AutoCAD osnap dialog box
    By bmason in forum AutoCAD Civil 3D - General
    Replies: 11
    Last Post: 2020-07-14, 03:09 PM
  2. 2010 MEP Osnap Dialog Scrambled
    By CADFX57 in forum AMEP General
    Replies: 0
    Last Post: 2010-06-08, 03:55 PM
  3. AutoLisp & Osnap Dialog Box
    By bdrummond in forum AutoLISP
    Replies: 3
    Last Post: 2008-04-11, 07:10 PM
  4. Replies: 5
    Last Post: 2007-04-26, 07:19 PM
  5. Help adding OSNAP to LISP
    By ReachAndre in forum AutoLISP
    Replies: 2
    Last Post: 2006-03-02, 10:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •