Another fiddly knotty problem.
A large combined file in our GIS format corrupted. I dug out all the old files that were originally used to create it but they are too old and will not combine in the GIS.
I exported each one to SHP, and then imported all of them into civil 3d as shp files, creating object data. This meant that I could correct the corrupted sections, which I have done, but now I need to get it back into the GIS program with the object data intact.
The problem is that the object data, coming from several combined files, is in several tables. Each table contains the same identical fields. (eg every table has a field called drawing)
I need to combine those tables so that I can re-export the shape files. I need one table with all of the object data in it.
Can someone please tell me how to do this? Thanks.
I believe the method is to create a join between the two ODtables and then use bulk copy to send all the information to annother format or repository.
As other comment the seek out the Map discussion group and Murph who may be able to assist further.
I'm using Civil 3d 2013.
However it's moot anyway. I found that I could combine the tables if I did it as I imported into C3d.
However when I exported...........
Older versions worked, but it seems that 2013 does not export the object data in a form that our GIS can read. Looks like a couple of weeks reinputting the data lies ahead for someone.
Function was passed an invalid structure pointer.
Looks like a couple of weeks reinputting the data lies ahead for someone.
Sir, in the XXI century you ought not to re-do anything, trust me.
If there's no privacy issues, share with us those several shapefiles: somehow, somebody will solve your puzzle.
What file format is the original data?
How did you export them to .shp? What software? Civil3d Map3d or some other?
Did you import into civil 3d with mapimport or data connect to the shp?
If you map imported each shp with data attached into one dwg, you should be able to mapexport all of the object and the attached object data to a new .shp with the data attached and be all set.
make backups of each step as you go in case of another corrupting event.
When you import the old shp files you need to select the same OD table for each file you import, this will give you just the one OD table to use when you export. If the field names (record attributtes ) are named the same once you inport one file just select that OD Table for the rest of the imports. If there are different field names in ech file then create an OD table with all the fields in it then import the files, use the OD Table you created to map the shp data to.
This reply is to cover everyone's responses.
First, thanks for replying, I appreciate your help, and so will the project manager if we get it working.
I'm sorry, but there are confidentiality issues about the data at this time. I may be able to strip some out into a small file to send. I'll have a go if I have time. Several new jobs have appeared in my intray, but I was told I could spend a little more time trying to get this fixed.
The GIS is a non industry standard program (called Gsys GDMS) written specificaly for Archaeology and the version we have is no longer supported by the creator. It's an excellent program with just one or two foibles that can cause huge problems.
ie Files tend to corrupt quite easily and usually we have lots of backups. In this case, however, the backups failed. I tried recreating from the original files, but many of them were originally created in a much older version of the product and corrupt instantly when recombined.
But the program can export to esri shape so I exported lines and polygons to shp, of each bit of the site, and imported into C3d using mapimport, and keeping 3 pieces of data as object data; namely drawing number, colour and layer of each object.
I did eventually work out what Murph has posted, and got the info in one object data table.
In the past, on the rare occasion I have had to take this sort of drastic action, I was able to replace the corrupted parts of the site in C3d, then export to shp using mapexport. I notice that the specific shp export option has vanished in 2013. There used to be two; one were you had to export each type of thing separately, and one where it sent everything together. The latter has vanished from 2013 .
However, I tried exporting, selecting the line option (All items in the file are (or should be) closed polylines, rather than polygons as CAD uses the term).
This is where I found the problem. So long as I export the shp file from C3d WITHOUT the object data, and just select 'layer' from the object properties, I can import into the GIS, but if I try to export the object data (drawing number, colour and layer), The GIS throws a series of errors about an invalid structure pointer. IN the past I have been able to get object data across into the GIS.
I tried changing the object data table name to be the same as the file, incase that was the problem, but no change.
I'm about to try importing on a computer with Win XP (as that was the computer where it was last successful) because it is just possible that the GIS is failing to work properly due to my OS on my new PC (win7 64bit. I did have to get a bit creative to get GSYS to work on here in the first place) . If that fails I will clip some data out and attach it here, and would be very thankful if anyone can work out what the problem may be.
I had to export as Shape Multiclass, and not as Esri Shp. That gave me two shp files which Gsys happily imported, including putting the drawing numbers back where they need to be for the SQLs to work. OK I lost the layers, but I expected that as GSYS cannot see layers in shp files and never has been able to, but the layer info is still there as a sub-tag if it's needed.
Hopefully I will remember which option for the future.
Thanks for helping.
Glad it finally worked, yes multi-class shp will create mulitple shp file one for each type of object (lines, polygons, points) in the dwg. Now I hope you copied the shp files to some place that are safe in case you need them again.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.