Hide Table of Contents
AutoRepair Property (IDocumentSpecification)

Gets or sets whether to automatically repair non-critical custom properties errors in the file to be opened.

.NET Syntax

Visual Basic (Declaration) 
Property AutoRepair As System.Boolean
Visual Basic (Usage) 
Dim instance As IDocumentSpecification
Dim value As System.Boolean
 
instance.AutoRepair = value
 
value = instance.AutoRepair
C# 
System.bool AutoRepair {get; set;}
C++/CLI 
property System.bool AutoRepair {
   System.bool get();
   void set ( &   System.bool value);
}

Property Value

True to automatically repair custom properties errors, false to not (default) (see Remarks)

Remarks

This property is valid only if IDocumentSpecification::Silent is set to true.

If the document to be opened has a non-critical data error, the non-critical data error may or may not be repaired, depending on how you set this property and other conditions.

If you set this property to true, and the file to open has non-critical data corruption in:

  • The custom properties area, the repair proceeds, and ISldWorks::OpenDoc7 returns the document with warning, swFileLoadWarning_e.swFileLoadWarning_AutomaticRepair.
  • An area other than custom properties, the document is not repaired.

The following files are created in c:\Users\user\AppData\Local\Temp:

  • Repaired_file_name.sld*
  • Backup of file_name.sld*

If you set this property to false, and the file to open has non-critical data corruption:

If critical data corruption exists in the file, and you set IDocumentSpecification::CriticalDataRepair to true to handle critical data corruption:

  • Non-critical data corruptions are ignored and not repaired.
  • Repairing critical errors necessitates obliterating all non-critical data. 

Use For C++ only, VARIANT_TRUE (-1) automatically repairs the file, and VARIANT_FALSE (0) does not.

See Also

Availability

SOLIDWORKS 2018 FCS, Revision Number 26.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   AutoRepair Property (IDocumentSpecification)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2023 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.