Hi There,
Without using sincpac would it be possible to create a lisp to match properties of a point to another? Keeps point number but matches, point style, label style, raw description and layer?
Cheers
Allan
Allan,
Description Keys or Point Groups won't work for you?
Dave
Dave Stoll
Las Vegas, Nevada
Using "Match Properties" on Cogo Points to match Point and Label Styles has been a wish list item since 2010. It's been over 12 years, time to grant that wish!
Point and label styles are tied to the point group. Not the point.
I understand. Might be nice to have the software functionality consistent throughout its civil features. Doesn’t mean wishes can’t be granted.
match label rotation match point style and match point label style
I put these on my quick access toolbar
not my code but I found it somewhere (probably here in 2016
======================
(defun c:mpr (/ doc ss ss2 obj obj2 newrot oldrot)
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vla-startundomark doc)
(princ "\nSelect point to match the label rotation of to: ")
(setq ss2 (ssget ":S" '((0 . "AECC_COGO_POINT"))))
(setq obj2 (vlax-ename->vla-object (ssname ss2 0)))
(setq newrot (vlax-get obj2 'LabelRotation))
(princ "\n....select Points to change label rotation: ")
(if (setq ss (ssget '((0 . "AECC_COGO_POINT"))))
(while (> (sslength ss) 0)
(setq obj (vlax-ename->vla-object (ssname ss 0)))
(vl-catch-all-apply
'(lambda ()
(vlax-put obj 'LabelRotation newrot)
)
)
;;this will catch the error that occurs if the user selects a point with <default> or <none> as the style
(ssdel (ssname ss 0) ss)
)
)
(vla-endundomark doc)
(princ)
)
==================================
;;; match point style
(defun c:mps (/ doc labelstyle layr lblstyle newstyle obj obj2 pt ptdesc ptlayer ptstyle sourcept ss ss2)
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vla-startundomark doc)
(princ "\nSelect source point to match the Point Style: ")
(if (setq ss (ssget ":S" '((0 . "AECC_COGO_POINT"))))
(progn
(setq sourcePt (vlax-ename->vla-object (ssname ss 0)))
;;;;;; (setq labelstyle (vlax-get sourcePt 'labelstyle))
(setq ptstyle (vlax-get sourcePt 'Style))
;;;;; (setq ptdesc (vlax-get sourcePt 'rawdescription))
;;;;; (setq ptlayer (vlax-get sourcePt 'layer))
(princ "\n....select Points to change the point style: ")
(if (setq ss (ssget '((0 . "AECC_COGO_POINT"))))
(while (> (sslength ss) 0)
(setq pt (vlax-ename->vla-object (ssname ss 0)))
;;;;;; (vlax-put pt 'labelstyle labelstyle)
(vlax-put pt 'Style ptstyle)
;;;;;; (vlax-put pt 'rawdescription ptdesc)
;;;;; (vlax-put pt 'layer ptlayer)
(ssdel (ssname ss 0) ss)
)
)
)
)
(vla-endundomark doc)
(princ)
)
=====================================
;;; match point lable style
(defun c:mpl (/ doc ss ss2 obj obj2 newstyle oldstyle)
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vla-startundomark doc)
(princ "\nSelect point to match the Label Style to: ")
(setq ss2 (ssget ":S" '((0 . "AECC_COGO_POINT"))))
(setq obj2 (vlax-ename->vla-object (ssname ss2 0)))
(setq newstyle (vlax-get obj2 'labelstyle))
(princ "\n....select Points to change: ")
(if (setq ss (ssget '((0 . "AECC_COGO_POINT"))))
(while (> (sslength ss) 0)
(setq obj (vlax-ename->vla-object (ssname ss 0)))
(vl-catch-all-apply '(lambda ()
(vlax-put obj 'labelstyle newstyle)
)
);;this will catch the error that occurs if the user selects a point with <default> or <none> as the style
(ssdel (ssname ss 0) ss)
)
)
(vla-endundomark doc)
(princ)
)