Can anybody post some sample codes (C# or VB.NET) including references on how to compare two .dwfx files. please?
I have been searching in this forum and the net but no luck. The Autodesk Design Review API does not provide any sample codes. Sofar I have seen a lot of back and forth discussions, but I would love to see the coding part.
thanks in advance,
Dean
Thank you for your question.
AdCommon.IAdMarkupEditor3_editor = (AdCommon.IAdMarkupEditor3)axCExpressViewerControl1.MarkupEditor;
AdCommon.IAdComparator_comparator = (AdCommon.IAdComparator)_editor.Comparator;
try
{
_comparator.Compare(firstFile, sectionOfFirstFile, sectionFile, sectionOfSecondFile);
AdCommon.eCompareResultStatus status = (AdCommon.eCompareResultStatus)_comparator.CompareResultStatus;
// eCompareResultStatus:
// 0: The two section have same contents
// 1: The two section have different contents
// 2: The two section are not comparable, they have different size or unit.
// 3: Comparion fails
AdCommon.IAdCollection resultObjects = _comparator.CompareResultObjects as AdCommon.IAdCollection;
foreach (AdCommon.IAdMarkup resultObject in resultObjects)
{
// deal with compare results.
}
}
You can also refer to this post for another sample.
Please reply back if you have further questions.
Hi Herbert
I am trying to compere the two sheets in Autodesk Design Review using API . Am using the same code as mentioned in vb.net but am getting the some error on that
Could you please help on this
Please find my source code