additional Object Snap options
Summary: Enhancement to object snap functionality that would add two new options to improve productivity.
Description: In future releases of AutoCAD and related vertical applications, I would like to see an object snap option added to snap to the Centroid of any closed shape, including closed polylines, boundaries, regions, hatches, etc.
Another valuable snapping option (not sure what to call it) would be one that would snap to proportional locations along a line or arc object based on some division parameter set in the Osnap settings dialog box. For example, if you entered a value of 20 and made this option active, you could snap to positions 20, 40, 60, and 80% along the length of a line or arc.
I believe both ideas could be implemented fairly easily.
Product and Feature: AutoCAD - Snaps
Submitted By: Michael Warren on 05/10/2013
Re: additional Object Snap options
You can create your own OSNAPS like the proportional one by using (C:CAL).
Transparently you would use this:
You have to pick 2 points, and it will return the mid point. You could create a toolbar flyout with 1/3, 1/2, 2/3, etc for quick access.
It's not exactly what you want. And it won't work on Arcs, but with some programming, you could get it to work. Which just means that Autodesk could make it work as well, probably much easier...
Re: additional Object Snap options
To snap proportional along a line try: http://forums.augi.com/showthread.ph...icrostation#16
For middle of an object:
Code:
; Middle Object Osnap
; Macro: ^P(or midobj (load "midobj.lsp")(princ))(midobj)
(defun midobj (/ ll ur selection pntlist pnts adoc)
(setq selection (car (entsel))
adoc (vla-get-activedocument (vlax-get-acad-object))
)
(vla-getboundingbox (vlax-ename->vla-object selection) 'll 'ur)
(setq pntlist (mapcar 'vlax-safearray->list (list ll ur)))
(list(/(+(caar pntlist)(caadr pntlist))2.0)(/(+(cadar pntlist)(cadadr pntlist))2.0))
)
For Centroid of closed polygon try:
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) ;; © Lee Mac 2011
(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
)
Re: additional Object Snap options
Quote:
Originally Posted by
Wish List System
Another valuable snapping option (not sure what to call it) would be one that would snap to proportional locations along a line or arc object based on some division parameter set in the Osnap settings dialog box. For example, if you entered a value of 20 and made this option active, you could snap to positions 20, 40, 60, and 80% along the length of a line or arc.
This one shouldn't be hard for them to add, as we already have similar options within dynamic blocks.