Hide Table of Contents
SetImportLayerToSheetFormat Method (IImportDxfDwgData)

Sets whether the specified visible layers are imported to the sheet format or drawing sheet.

.NET Syntax

Visual Basic (Declaration) 
Function SetImportLayerToSheetFormat( _
   ByVal Layers As System.Object, _
   ByVal SheetFormat As System.Boolean _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IImportDxfDwgData
Dim Layers As System.Object
Dim SheetFormat As System.Boolean
Dim value As System.Boolean
 
value = instance.SetImportLayerToSheetFormat(Layers, SheetFormat)
C# 
System.bool SetImportLayerToSheetFormat( 
   System.object Layers,
   System.bool SheetFormat
)
C++/CLI 
System.bool SetImportLayerToSheetFormat( 
&   System.Object^ Layers,
&   System.bool SheetFormat
) 

Parameters

Layers
Array of strings of the names of the layers (see Remarks)
SheetFormat
True to import the specified visible layers to the sheet format, false to import them to the drawing sheet

Return Value

True of importing the specified visible  layers was successful, false if not

Remarks

This method only supports importing to a drawing; it does not support importing to a part sketch.

 

The Layers argument can contain either a string or an array of strings, where the strings are the layer names with which to work. You can also specify the argument as empty, which indicates all layers. If this method is not used, the default behavior is to import all layers to the drawing sheet.  

 

The import to sheet or sheet format Boolean is the same for all sheets that are imported; you cannot specify it on a sheet-by-sheet basis.

 

Visual Basic for Applications (VBA) Example

To import all layers on all sheets to drawings sheets in SOLIDWORKS (this is the default behavior):

 

boolstatus = ImportDxfDwgData.SetImportLayerToSheetFormat (emptyVariant, false)

 

 

To import layers "A" and "B" to the drawing sheet and the remaining layers to the sheet format:

 

boolstatus = ImportDxfDwgData.SetImportLayerToSheetFormat (emptyVariant, True)

layerName(0) = "A"

layerName(1) = "B"

layerVariant = layerName

boolstatus = ImportDxfDwgData.SetImportLayerToSheetFormat ((layerVariant), false)

 

See Also

Availability

SOLIDWORKS 2007 FCS, Revision Number 15.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:   SetImportLayerToSheetFormat Method (IImportDxfDwgData)
*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) 2018 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.