Message 1 of 4
Another Inventor API bug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to use the OnFileresolution event to resolve files and so far this is what I have:
Option Explicit
Private WithEvents inv As Inventor.FileAccessEvents
Private invApp As Inventor.Application
Private Sub Class_Initialize()
On Error Resume Next
Set invApp = GetObject(, "Inventor.Application")
If Err Then
Err.Clear
Set invApp = CreateObject("Inventor.Application")
invApp.Visible = False
End If
On Error GoTo 0
Set inv = invApp.FileAccessEvents
End Sub
Private Sub inv_OnFileResolution(ByVal RelativeFileName As String, ByVal LibraryName As String, CustomLogicalName() As Byte, ByVal BeforeOrAfter As Inventor.EventTimingEnum, ByVal Context As Inventor.NameValueMap, FullFileName As String, HandlingCode As Inventor.HandlingCodeEnum)
Dim str As String
HandlingCode = kEventHandled
If (BeforeOrAfter = kBefore) Then
str = "C:\New folder\"
FullFileName = str & RelativeFileName
End If
End SubThe problem is the Handlingcode does nothing. Event though it is set to handled, I still get a dialog box asking for the file which I have specified in the FullFileName.
Anyone else got this? ![]()
