Hide Table of Contents
ImportHoleWizardItem Method (ISldWorks)

Imports data for the specified Hole Wizard standard.

.NET Syntax

Visual Basic (Declaration) 
Function ImportHoleWizardItem( _
   ByVal StdToImport As System.String, _
   ByVal DestinationFilePath As System.String, _
   ByVal ReplaceData As System.Boolean, _
   ByVal ErrorFile As System.Boolean _
) As System.Integer
Visual Basic (Usage) 
Dim instance As ISldWorks
Dim StdToImport As System.String
Dim DestinationFilePath As System.String
Dim ReplaceData As System.Boolean
Dim ErrorFile As System.Boolean
Dim value As System.Integer
 
value = instance.ImportHoleWizardItem(StdToImport, DestinationFilePath, ReplaceData, ErrorFile)
C# 
System.int ImportHoleWizardItem( 
   System.string StdToImport,
   System.string DestinationFilePath,
   System.bool ReplaceData,
   System.bool ErrorFile
)
C++/CLI 
System.int ImportHoleWizardItem( 
&   System.String^ StdToImport,
&   System.String^ DestinationFilePath,
&   System.bool ReplaceData,
&   System.bool ErrorFile
) 

Parameters

StdToImport
Standard to import (see Remarks)
DestinationFilePath
Path and name of file to import (see Remarks)
ReplaceData
True to replace data, false to not
ErrorFile
True to create an error file, false to not

Return Value

0 if the Hole Wizard standard imported successfully, 1 if not

Example

'VBA Preconditions'
'Open a part.
'Ensure the *.xlsx file exists.
Dim swApp As SldWorks.SldWorks
Dim SourceHWItem As String
Dim DestinationFoldeName As String
Dim longstatus As Long
Option Explicit
Sub Main()
    Set swApp = Application.SldWorks
   
    SourceHWItem = "ansi inch\Counterbore Holes\Hex Bolt"
   
    DestinationFolderName = "C:\temp\ANSI Inch_Counterbore Holes_Hex Bolt.xlsx"
   
    longstatus = swApp.ImportHoleWizardItem(SourceHWItem, DestinationFolderName, True, True)
   
           
    Exit Sub
End Sub

Remarks

Specify StdToImport with the path and file name as shown on the Hole Wizard tab of the Toolbox, e.g., "ansi inch\Counterbore Holes\Hex Bolt".

Specify DestinationFilePath with the path and file name of the Excel Workbook (*.xslx) you want to import. The Excel file name is formatted as follows:

standard_hole class_hole type.xslx

 

 

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:   ImportHoleWizardItem 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.