Hide Table of Contents
CloseDoc Method (ISldWorks)

Closes the specified document.

.NET Syntax

Visual Basic (Declaration) 
Sub CloseDoc( _
   ByVal Name As System.String _
) 
Visual Basic (Usage) 
Dim instance As ISldWorks
Dim Name As System.String
 
instance.CloseDoc(Name)
C# 
void CloseDoc( 
   System.string Name
)
C++/CLI 
void CloseDoc( 
&   System.String^ Name
) 

Parameters

Name

Name of document

Example

Remarks

This method has no effect if the specified document is not open. If Name is set to an empty string  (""), then the active document is closed.

If you are closing the only document open in the SOLIDWORKS session and this SOLIDWORKS session is a background session, then calling this method, or calling ISldWorks::QuitDoc, results in the SOLIDWORKS session being closed.

A background SOLIDWORKS session can be created when the SOLIDWORKS session is started by your application and the session is not controlled by the user; i.e., ISldWorks::UserControl set to false.

To keep the SOLIDWORKS session open, set ISldWorks::UserControl to True, which makes the session visible, or you can close your documents at the end of your program execution.

 

See Also



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:   CloseDoc Method (ISldWorks)
*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) 2019 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.