DWF

Reply
Member
kingj02
Posts: 3
Registered: ‎07-11-2011
Message 1 of 2 (571 Views)

IAdComparator does not work with dwfx's converted by Design Review

571 Views, 1 Replies
07-19-2011 12:55 PM

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.MarkupEditor;
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?

 

Thanks,

 

Jonathan

Member
Posts: 3
Registered: ‎02-06-2013
Message 2 of 2 (439 Views)

Re: IAdComparator does not work with dwfx's converted by Design Review

02-06-2013 03:48 AM in reply to: kingj02

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-FD82346DA123".

 

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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community