Specifies whether a cyclic redundancy check (CRC) should be performed each time an object is read into the drawing.
Supported platforms: Windows only
VBA:
object.FullCRCValidation
Type: PreferencesOpenSave
The object this property applies to.
Read-only: No
Type: Boolean
The initial value for this property is False.
If your drawings are being corrupted and you suspect a hardware problem or an AutoCAD error, set FullCRCValidation to True.
VBA:
Sub Example_FullCRCValidation() ' This example returns the current setting of ' FullCRCValidation. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currFullCRCValidation As Boolean Set preferences = ThisDrawing.Application.preferences ' Retrieve the current FullCRCValidation value currFullCRCValidation = preferences.OpenSave.FullCRCValidation MsgBox "The current value for FullCRCValidation is " & preferences.OpenSave.FullCRCValidation, vbInformation, "FullCRCValidation Example" ' Change the value for FullCRCValidation preferences.OpenSave.FullCRCValidation = Not (currFullCRCValidation) MsgBox "The new value for FullCRCValidation is " & preferences.OpenSave.FullCRCValidation, vbInformation, "FullCRCValidation Example" ' Reset FullCRCValidation to its original value preferences.OpenSave.FullCRCValidation = currFullCRCValidation MsgBox "The FullCRCValidation value is reset to " & preferences.OpenSave.FullCRCValidation, vbInformation, "FullCRCValidation Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_FullCRCValidation() ;; This example returns the current setting of ;; FullCRCValidation. It then changes the value, and finally ;; it resets the value back to the original setting. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Retrieve the current FullCRCValidation value (setq currFullCRCValidation (vla-get-FullCRCValidation (vla-get-OpenSave preferences))) (alert (strcat "The current value for FullCRCValidation is " (if (= currFullCRCValidation :vlax-true) "True" "False"))) ;; Change the value for FullCRCValidation (setq newFullCRCValidation (if (= currFullCRCValidation :vlax-true) :vlax-false :vlax-true)) (vla-put-FullCRCValidation (vla-get-OpenSave preferences) newFullCRCValidation) (alert (strcat "The new value for FullCRCValidation is " (if (= newFullCRCValidation :vlax-true) "True" "False"))) ;; Reset FullCRCValidation to its original value (vla-put-FullCRCValidation (vla-get-OpenSave preferences) currFullCRCValidation) (alert (strcat "The FullCRCValidation value is reset to " (if (= currFullCRCValidation :vlax-true) "True" "False"))) )