These may help -
Code:
;;;---------------------------------------------------------------------;
;;; COGO Point Number
(defun C3d-Get-CogoNumber (cogo)
(vlax-get cogo 'number)
)
(defun C3d-Set-CogoNumber (cogo cogoNumber)
(vlax-put cogo 'number cogoNumber)
)
;;;---------------------------------------------------------------------;
;;; COGO Point Elevation
(defun C3d-Get-CogoElevation (cogo)
(vlax-get cogo 'elevation)
)
(defun C3d-Set-CogoElevation (cogo cogoElevation)
(vlax-put cogo 'elevation cogoElevation)
)
;;;---------------------------------------------------------------------;
;;; COGO Point Label Style
(defun C3d-Get-CogoLabelStyle (cogo)
(vlax-get (vlax-get cogo 'labelstyle) 'name)
)
(defun C3d-Set-CogoLabelStyle (cogo labelStyleName)
(vlax-put (vlax-get cogo 'labelstyle) labelStyleName)
)
;;;---------------------------------------------------------------------;
;;; COGO Point Style
(defun C3d-Get-CogoStyle (cogo)
(vlax-get (vlax-get cogo 'style) 'name)
)
(defun C3d-Set-CogoStyle (cogo styleName)
(vlax-put (vlax-get cogo 'style) styleName)
)
Sample:
Code:
(vl-load-com)
(defun c:ListCogo (/ *error* ss)
(defun *error* (msg)
(if ss (vla-delete ss))
(cond ((not msg)) ; Normal exit
((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit)
((princ (strcat "\n** Error: " msg " ** "))) ; Fatal error, display it
)
(princ)
)
(if (ssget ":S:E" '((0 . "AECC_COGO_POINT")))
(progn
(prompt
"\nPoint Number, Point Elevation, Point Label Style, Point Style "
)
(vlax-for x
(setq
ss (vla-get-activeselectionset
(vla-get-activedocument (vlax-get-acad-object))
)
)
(prompt
(strcat "\n"
(itoa (C3d-Get-CogoNumber x))
", "
(rtos (C3d-Get-CogoElevation x) 2 2)
", "
(C3d-Get-CogoLabelStyle x)
", "
(C3d-Get-CogoStyle x)
)
)
)
(terpri)
)
)
(*error* nil)
)