Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Match point properties

6 REPLIES 6
Reply
Message 1 of 7
allanbsteven
734 Views, 6 Replies

Match point properties

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

 

6 REPLIES 6
Message 2 of 7
Pointdump
in reply to: allanbsteven

Allan,

 

Description Keys or Point Groups won't work for you?

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 3 of 7
gothitis
in reply to: allanbsteven

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!

Message 4 of 7
LucasHicks
in reply to: allanbsteven

Point and label styles are tied to the point group.  Not the point.

OpenRoads Designer, Civil 3D
Message 5 of 7
gothitis
in reply to: LucasHicks

I understand. Might be nice to have the software functionality consistent throughout its civil features. Doesn’t mean wishes can’t be granted. 

Message 6 of 7
caddie99
in reply to: allanbsteven

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)
)

Message 7 of 7
NmiglioriCadLad
in reply to: caddie99

YES! most useful lisp! thank you for sharing

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report