Author Topic: Extracting data from hatches and blocks  (Read 1088 times)

0 Members and 1 Guest are viewing this topic.

sauron-83

  • Mosquito
  • Posts: 8
Extracting data from hatches and blocks
« on: September 02, 2016, 06:16:14 PM »
Hi all,
one more time I need your help...
Could anyone help me with extraction data (extended entity data) from objects as in file I've attached?
I think data I need is stored in dictionaries but I haven't dug so deep

Is there quick way to extract all those data as texts/mtexts somewhere in the middle of such objects?
I mean exact those three data from the picture I also attached here: parcels (KOMMUNNAMN, TRAKT and BLOCKENHET).

I dont know how original file was created, but file attached  here   is only small part of it to show how it looks like.

Thanks in advance for any clues,
Chris

sauron-83

  • Mosquito
  • Posts: 8
Re: Extracting data from hatches and blocks
« Reply #1 on: September 03, 2016, 04:51:08 PM »
OK, I've got help.
It was created in MAP 3D and with this simple code I am able to get this data.

Code: [Select]
;Lists Site, Property and Number for a selected hatch.

(defun c:go( / obj recno)

  (setq obj (car (entsel "\nSelect hatch: ")))

  (setq recno (ade_odgetrecord obj "Ytor" 0))
  (setq Site (ade_odgetrecfield recno "KOMMUNNAMN"))
  (setq PropName (ade_odgetrecfield recno "TRAKT"))
  (setq ParcelNum (ade_odgetrecfield recno "BLOCKENHET"))


  (prompt (strcat "\nSite: " Site))
  (prompt (strcat "\nProperty Name: " PropName))
  (prompt (strcat "\nNumber: " ParcelNum))
  (princ)
  );end
I'll do rest by myself.
Great thanks Tim Corey.

sauron