I have written a basic web service using RealDWG(.NET) that can update a DWG-file from one version to another with an option to update an existing block attribute. No other content in the DWG file should be changed/corrupted/deleted in a way so it cannot be edited just as before my little service executed and saved the file. The service seems to work fine when using some sample files I have received. I've done a visual comparison using DWG TrueView 2013 and to my eye it looks the same. Does anyone know of a tool that could compare and list if something was changed or excluded from the original drawing?
Even though the resulting file looks ok I've noticed a couple of things that makes me wonder if I've missed something:
I see that the file size actually differs quite a bit after saving the file. I expected that the file would be the same size when I specify that it should be saved using the same version as the original file (for example AC1021. I notice that a couple of fonts (SHX files) could not be found when reading the source DWG but I do not think that should have any effect?
I see that several dbx files are being loaded when a file is loaded/parsed (AecBase.dbx, AecbElecBase.dbx, …). Do these object enablers require that I add any dependencies to my visual studio 2010 project? At the moment I only have a dependency to acdbmgd.dll. From the documentation I could not really work out if I needed to add more dependencies than the one I have but I might have been reading in the wrong places…
I have no idea what program(s) were actually used to create the drawings I have tested but the service have to handle files produced with several different AutoCAD products (including different versions).
Being new to RealDWG and most things related to AutoCAD any help or guidance would be greatly appreciated.
If theAecxxx files are being loaded, then the objects that they own/implement will be updated to the version of your RealDWG and cannot be changed back to an older version even if you save the file back to an older version dwg. That's fine if they were already the current version, but from what you are saying, that would not be fine if they were an older version to start with.
Another thing that could affect file size is if the drawing was saved in Acad with partial save enabled. This would cause the drawing to have extra data in it from the partial saves. When your RealDWG app saves it, that will be a full save and will remove the partial save data since it is no longer needed. That woudl cause the dwg file to shrink.