I get the following error when using the Compare function if either DWFX file has been converted from a DWG by Design Review: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
I use the following code:
IAdMarkupEditor3 markupEditor = (IAdMarkupEditor3)axCExpressViewerControl1.MarkupE
ditor; IAdComparator Comparator = (IAdComparator)markupEditor.Comparator; Comparator.Compare(@"C:\temp\File1.dwfx", "Model", @"C:\temp\File2.dwfx", "Model");
If the files were manually exported from autocad, the above code works fine. But if I do a SaveAs via the axCExpressViewerControl to convert a DWG to a DWFX (or manually open the drawing in Design Review and to a SaveAs), the above code does not work. However, if I manually compare the two files with Design Review, it does work.
Does anyone know what's going on? Am I doing something wrong? Or is there a workaround?
I know it's been a while, but for anyone who's had the same, I worked out you need to have the correct section names in the Compare method call instead of "Model" (unless your section names are exactly that).
Sample files I've got have names like this: "com.autodesk.dwf.ePlot_3E09234F-F951-46EA-ABC1-FD
I found if the section names don't match you get the rather unhelpful and worrying protected memory exception.
I found the section names in the manifest.xml files within the DWF, but I guess there are other ways to obtain them. I'm looking to read these programatically.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register