"rehyes" wrote in message
news:f090289.-1@WebX.maYIadrTaRb...
How can the object data values of a point be converted into text that is
located at each point? How can object data values be accessed by LISP or
VBA?
I'm not certain what you're asking for here, but I pieced together a few
sections of code that perform different functions, and somewhere in there
you might find an answer your question.
assuming "PointTable" is an existing Object Data Table, and
assuming "XY" is a character field in the OD table, and
assuming (pt_ss) is a selection set of points...
(setq pt_unit (getvar "lunits")); units
(setq pt_prec (getvar "luprec")); precision
(setq pt_table "PointTable"); od table
(setq pt_fld "XY"); odt field
(setq pt_no 0)
(while (and pt_ss (setq pt_nm (ssname pt_ss pt_no))); loop through point ss
(setq pt_get (entget pt_nm))
(setq pt_ins (aso 10 pt_get)); x,y
(setq pt_xr (nth 0 pt_ins)); x coord
(setq pt_yr (nth 1 pt_ins)); y coord
(setq pt_x (rtos pt_xr pt_unit pt_prec)); x to string
(setq pt_y (rtos pt_yr pt_unit pt_prec)); y to string
(setq pt_xy (strcat pt_x "," pt_y)); x,y string
(if (= (ade_odgettables pt_nm) nil); attach od table, if not already
attached to point
(ade_odaddrecord pt_nm pt_table))
(ade_odsetfield pt_nm pt_table pt_fld 0 pt_xy); add xy string to field
(setq pt_text (ade_odgetfield pt_nm pt_table pt_fld 0)); extract xy from
table
(command "_text" "mc" pt_ins "1" 0 pt_text); write to text
(setq pt_no (1+ pt_no))
);end while
Eric Smallwood