Engineering Systems

3dx solidworks Connector - Commit Error : E_IEF_CHECKIN_CFG_REF_NOT_FOUND  0x800402F7  Referenced configuration not found 

Discussion created by Engineering Systems on Sep 3, 2019

Hi Guys,

 

I have small piece of .net code for .sldprt checkin via 3dx connector Commit() API,

But throwing Error : E_IEF_CHECKIN_CFG_REF_NOT_FOUND  0x800402F7  Referenced configuration not found.

Not able to figure out reason behind.

 

Imports System.IO
Imports System.Drawing
Imports System.Configuration
Imports System.Collections
Imports System.Collections.Generic
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports System
Imports System.Linq
Imports System.Text
Imports Microsoft.VisualBasic
Imports ENOAPILib
Imports SOLIDWORKSPLUGINLib
Imports SwConst
Imports EnoviaSW2Lib
Imports PDMWorks
Imports SldWorks
Imports SolidWorks

 

Dim server As IEnoServer
server = New EnoServer

 

'Get the ENOVIA view from the path
Dim serverName As String
serverName = server.GetServerNameFromPath("MyEnovia")


If serverName = "" Then Exit Sub

'MsgBox("Server Name is '" + serverName + "'.")

 

'Log in silently
server.LoginAuto(serverName, Me.Handle.ToInt32)

 

Dim checkin As IEnoBatchCheckIn

checkin = server.CreateUtility(EnoObjectType.EnoObj_EnoBatchCheckIn)

 

Dim newSelection As IEnoSelection
newSelection = server.CreateUtility(EnoObjectType.EnoObj_EnoSelection)

 

newSelection =

server.BrowseForFile( Me.Handle.ToInt32,EnoBrowseFlag.EnoBws_ForOpen +                                        noBrowseFlag.EnoBws_PermitMultipleSel + EnoBrowseFlag.EnoBws_PermitLocalFiles +                                        EnoBrowseFlag.EnoBws_PermitVaultFiles,

                                      "(*.sldprt; *.sldasm;*.slddrw)|*.sldprt;*.sldasm;*.slddrw|All Files (*.*)|*.*||", "","",

                                        server.RootFolderPath, "Select Files to CheckIn ")

 

Dim PrepBool As Boolean
PrepBool = checkin.Prepare(Me.Handle.ToInt32, EnoCheckInBuildTreeFlags.Ecibtf_MayCheckIn)

 

Dim result As Boolean
result = checkin.ShowDlg(Me.Handle.ToInt32)

 

Dim ResultSelection As IEnoSelection
If (True = result) Then
   checkin.Commit(Me.Handle.ToInt32) 
   ResultSelection = checkin.GetFileList(EnoCheckInFileListFlag.Enociflf_GetCheckedIn +                                  EnoCheckInFileListFlag.Enociflf_GetUnprocessed)
End If

 

 

Also, I tried to do the same scenario onto VBA platform, but failed to create the server object itself.

 

Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc

Dim obj As EnoServer
Set obj = CreateObject("IEnoServer")  --> throwed error while creation. Might be that string itself is wrong

 

So, If any of you could help me out in resolving the issue would be great.

 

I want to execute this simple program in both .net and VBA.

 

Thanks in Advance

 

Artem TaturevychGreg JankowskiSolidWorks CorpJason CapriottiSolidWorks API Support

Outcomes