Results 1 to 5 of 5

Thread: Center of object Osnap

  1. #1
    Member
    Join Date
    2002-01
    Posts
    2
    Login to Give a bone
    0

    Question Center of object Osnap

    Hall of Fame wishlist item #464611 Center of object osnap thread was closed because the wish has been granted - Really??
    Please enlighten me- I can't find it. I purchased Gile's version, only to find it doesn't work like the center of a circle osnap point does.
    Help please.

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

    Default Re: Center of object Osnap

    Odd, even if the app worked and was free the wish was for an osnap added to AutoCAD. Doesn't sound like a wish granted to me.

    For now here's a couple macros you can add for osnaps:
    Snap, MidObject
    Code:
    ^P_non (or midobj (load "midobj.lsp")(princ))(midobj)
    Snap, Fraction Between 2 Points
    Code:
    (setvar "USERR1" (getreal "Fraction of the distance between pick points: "));\'cal plt(cur,cur,getvar(USERR1));
    Snap, Centroid
    Code:
    ^P(or C:pc1 (load "pc1.lsp"))(pc1)
    Snap, Centroid which is probably what you're looking for requires "pc1.lsp".
    Code:
     ;Center of closed polygon
    ;^P(or C:pc1 (load "pc1.lsp"))(pc1)
    ; (load "pc1.lsp")(pc1)
    (defun pc1 ( / acdoc acspc acsel reg pt) (vl-load-com) ;; pc.lsp by Lee Mac modified for transparent osnap.
      (setq acdoc (vla-get-ActiveDocument (vlax-get-acad-object))
            acspc (vlax-get-property acdoc (if (= 1 (getvar 'CVPORT)) 'Paperspace 'Modelspace))
      )
    ;  (if (ssget "+.:E:S")
      (if (ssget "+.:E:S" '((0 . "LWPOLYLINE") (-4 . "&=") (70 . 1)))
        (progn
          (vlax-for obj (setq acsel (vla-get-ActiveSelectionSet acdoc))
            (setq pt(trans (vlax-get (setq reg (car (vlax-invoke acspc 'addregion (list obj)))) 'Centroid) 1 0))
            (vla-delete reg)
          )
          (vla-delete acsel)
        )
      )
      pt
    )

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Center of object Osnap

    This has been wished for many times:

    Quote Originally Posted by BlackBox View Post
    Instead I use Gile's Custom Osnap plugin... This provides third (TRD), quarter (QTR), centroid (CTR), and Fraction (FRC) snaps.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  4. #4
    Member
    Join Date
    2002-01
    Posts
    2
    Login to Give a bone
    0

    Default Re: Center of object Osnap

    Thanks for your input guys - but I still am looking for the SAME FUNCTIONALITY as we currently get with circles and arcs:
    When I pick a circle all of it's snap points/grips highlight, and if I move the curser near the center point it will
    "magnet" to it so I can click to grab the circle by the center to move it. All this happens WITHOUT having to type
    any 3 letter codes to acquire the wanted grip/snap point. Should be the same for any polyline picked - lightweight, heavyweight,
    closed, open . . .
    Like I mentioned I have Gile's Osnap plugin - nice but it requires typing in alias' for the desired snap.
    This may be beyond the realm of .lsp . I thought it was built in by now, and I just missed how to turn it on.

  5. #5
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: Center of object Osnap

    nope -- you're not missing it. still doesn't exist in acad 2015

Similar Threads

  1. OSNAP for center of polygon
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 5
    Last Post: 2015-04-13, 03:56 PM
  2. Center of object OSnap
    By Wish List System in forum AutoCAD Wish List
    Replies: 3
    Last Post: 2013-03-03, 01:13 PM
  3. Osnap center
    By djones.220368 in forum AutoCAD Customization
    Replies: 1
    Last Post: 2009-06-18, 09:28 PM
  4. How I can activate object osnap to define a view
    By allands36 in forum AutoCAD Tips & Tricks
    Replies: 0
    Last Post: 2008-07-07, 04:21 PM
  5. Center Marks to have Object Intelligence
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2008-05-27, 09:25 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
  •