Method CmdCompare
- Namespace
- VectorDraw.Professional.ActionUtilities
- Assembly
- VectorDraw.Professional.dll
CmdCompare(object, object, bool)
Compares two drawings and visualizes the differences in the current document.
public int CmdCompare(object Drawing1Path, object Drawing2Path, bool navigate)
Parameters
Drawing1PathobjectThe file path of the first drawing to compare. Pass a 'user' object to display a file dialog.
Drawing2PathobjectThe file path of the second drawing to compare. Pass a 'user' object to display a file dialog.
navigateboolIf
true, the method waits for the user to press arrow keys to automatically zoom to the yellow rectangle areas where differences are found.
Returns
- int
0 if there are no differences between the drawings.
Greater than 0 if differences are found.
-1 if an error occurs during comparison.
Remarks
This method allows you to quickly identify differences between two versions of a drawing, displaying changes with color coding.
See Compare(vdDocument) for additional information.
Important Notes:
- It is recommended to compare drawings of the same type and extension.
- Two block references are added to this document, one for each compared drawing.
- The comparison only works for objects in Model Space.
- Double-value properties are compared using the CompareDocumentSettings DecimalPrecision setting, which defaults to 8 decimal places.
Color Coding Convention:
| vdDocument.FileProperties.CompareDocumentSettings.SameObjectsColor | Objects that are identical in both drawings. |
| vdDocument.FileProperties.CompareDocumentSettings.NoMatchingObjectsColor1 | Objects in drawing 1 that have no matching object in drawing 2. |
| vdDocument.FileProperties.CompareDocumentSettings.NoMatchingObjectsColor2 | Objects in drawing 2 that have no matching object in drawing 1. |
| vdDocument.FileProperties.CompareDocumentSettings.DifferentObjectsFadeEffect | Fade effect applied to objects of the same type with the same handle but different properties on both drawings. |
| vdDocument.FileProperties.CompareDocumentSettings.RectangleColor | Rectangles that group neighboring changes for visual clarity. |
| vdDocument.FileProperties.CompareDocumentSettings.IncomparableObjectsColor | Objects that are incomparable, usually because comparison is not supported for their type. |
- See Also
-
CompareDocuments