Convert Database data back into object data after deleting the object data table

Convert Database data back into object data after deleting the object data table

a_zayedX5MJ9
Contributor Contributor
819 Views
7 Replies
Message 1 of 8

Convert Database data back into object data after deleting the object data table

a_zayedX5MJ9
Contributor
Contributor

Hi everyone,
When I converted the object data into the data base using mapod2ase I deleted the object data tables so the objects are empty unless connected to the data base.
And the data in the data base got modified couple of times.
So now I was asked to get the DWG with the object data back from the data base for every selected item.
If anyone has suggestions that would be great.
((Special thanks to Olivier Eckmann for the great OD plugin which made my life easier dealing with OD also i feel i can use it to solve my problem but don't know how.))
Thanks in advance.

0 Likes
Accepted solutions (1)
820 Views
7 Replies
Replies (7)
Message 2 of 8

a_zayedX5MJ9
Contributor
Contributor
the PNG attached is an example of the data that is connected to the database but if disconnected the database only the first field that contains the Onpipeline_ID ( the key ) would be shown.
0 Likes
Message 3 of 8

ChicagoLooper
Mentor
Mentor

Hi @a_zayedX5MJ9 

If you are dealing with AutoCAD entities that have Object Data, then the 'DATA TABLE' is attached to those AutoCAD entities. Until that specific data table is 'detached' the data table will remain. Here are some things you might not know about Data Tables:  

 

  1. You can have more than one Data Table attached to an entity.
  2. The data contained in the table can be numeric: either real (decimal) or integer. Or X,Y coordinates.
  3. The data doesn't have to be numeric, it can also be character (letters and $ymbol$)
  4. You can add or delete a field in an existing Table and you can rename a Table, and to some extent, you can modify the data 'type.'

If you delete a Table, the attached data is gone, so you'll need to access the data's original  SOURCE to view, reuse or replace the missing data. 

 

If you delete the contents of a table, you may, or may not, be able to get the data back depending on your data SOURCE and the method you used to move the data from its source to the Data Table.

 

Data source means where the data came from. Can upload the data?

 

The contents of your Data Table is like a file cabinet with drawers. If you empty the cabinet drawers by throwing files away (either on purpose or by accident) then the files as gone. Even though the file cabinet still exists, the drawers are empty.

 

In a case like that, you'd have to go back to the original data to replace the original data that was once in the cabinet file. The original data is the answer to your problem. Once you've got the original data back, then you can worry about the modifications you made to that data.

 

 

Chicagolooper

EESignature

0 Likes
Message 4 of 8

O_Eckmann
Mentor
Mentor

Hi,

 

You can :

1. createOD Table with fields you want to populate, and attach empty record on each object

2. Export with ODOUT to TXT file (TXT file contains only HANDLE and empty fields)

3. MAPEXPORT to SHP from your drawing with data "HANDLE" and external data 

4. open in Excel (or LO Calc) : DBF file and TXT file

5. Make a join on HANDLE to fill TXT with all value from DBF, and save bak TXT file

6. ODIN to populate OD from TXT 

 

Olivier

Olivier Eckmann

EESignature

0 Likes
Message 5 of 8

a_zayedX5MJ9
Contributor
Contributor
hello chicagolooper,
thank you for your time and sorry for the late reply.
unfortunately, there are updates that has been made to the access data base so if went back to the original file when it had object data there will be work lost.
0 Likes
Message 6 of 8

a_zayedX5MJ9
Contributor
Contributor
hello Olivier,
sorry for the late reply and thanks again for the great plugin.
I get most of the steps, but you lost me in (handle) I don't know what this is.
and also, the object data that was written on blocks will be lost because you can't export shp for different blocks only lines and points as you definitely know.
0 Likes
Message 7 of 8

ChicagoLooper
Mentor
Mentor

Hello @a_zayedX5MJ9 

 <<….there are updates that has been made to the access data base so if went back to the original file when it had object data there will be work lost...>>

 

You’ll need to go back to the source, the original file which contained the data that populated the original Object Data Table so you can repopulate the fields that have not changed.

If you updated a some of the data and have accidentally deleted those updates, then you’ll need to perform those updates again. Yes, I understand the Data Table still exists, but the contents of the table is gone and all that remains are the ‘Placeholders.’

 

I know that’s not want you to hear, but that’s the only way.

 

If it were me I wouldn’t look at recovering Object Data because it would be a waste of time. I’d look at recovering the dwg file itself by going back to see whether I could ‘recover’ the dwg as it existed at a previous date in time. That drawing contains everything you need and solves your problem perfectly. 

Due to your loss, this should be treated as an IT issue, not a Map3D issue. Somewhere,

some place deep in your hard drive, that OLD DRAWING still exists. You just need someone skilled in IT to find it and pull it out. 

 

Chicagolooper

EESignature

Message 8 of 8

O_Eckmann
Mentor
Mentor
Accepted solution

Hi @a_zayedX5MJ9 ,

 

Handle is a uniq and invariant identifier (coded in hexa) for each object in a drawing.

In ODIN and ODOUT command, I use it in first column to link each row to its corresponding object (similar as ATTOUT/ATTIN).

MAPEXPORT as POINT accepts point AND block

Here a video of my proposed process

 

This process should be used only if you want to keep original objects in your drawing (because of color/linetype/rotation/attributs...).

If not, you can MAPEXPORT / MAPIMPORT to convert LT to OD.

 

Olivier

Olivier Eckmann

EESignature