Author Topic: Extracting Object Data from Line to Text  (Read 1803 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Extracting Object Data from Line to Text
« on: July 18, 2016, 10:04:28 AM »
I have this object I have imported from a shape file. Is there a way I can get the "FULLNAME" field data to a Mtext? It would be nice if I could run the command, pick the entity and pops up a text above where I picked... Thanks for any input.
Civil3D 2020

ChrisCarlson

  • Guest
Re: Extracting Object Data from Line to Text
« Reply #1 on: July 18, 2016, 10:44:28 AM »
Since I don't have the drawing, are there any options under Insert Field?

Rod

  • Newt
  • Posts: 185
"All models are wrong, some models are useful" - George Box

Rod

  • Newt
  • Posts: 185
Re: Extracting Object Data from Line to Text
« Reply #3 on: July 19, 2016, 02:55:02 AM »
The function is ade_odgetfield

from the help
(ade_odgetfield ename table field recnum)

Returns a field value (data type varies) or nil.

ename AutoCAD object name.
table Table name (string) can be up to 25 characters long. Must be unique, contain no spaces, and start with an alphanumeric character
field Field name (string) can be up to 31 characters long. Must be unique, contain no spaces, and start with an alphanumeric character
recnum Record number (integer). The number of the first record is 0

To identify a unique record, you need to specify the table to which it belongs, the object to which it is attached, and its record number. The record number is necessary because more than one record from the same table can be attached to an object. For more information about records and record numbers, see ade_odaddrecord.

The field value returned can be one of four data types: integer, character, point, or real.
"All models are wrong, some models are useful" - George Box

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Re: Extracting Object Data from Line to Text
« Reply #4 on: July 19, 2016, 07:11:33 AM »
I will look into that alittle more. Hopefully I can figure this thing out.

BTW, Please see the attached DWG for an example.

Thanks again!
Civil3D 2020

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox