Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API Call ReferenceNotFoundNotify / SetMissingReferencePathName

Status
Not open for further replies.

MadMango

Mechanical
Joined
May 1, 2001
Messages
6,992
Location
US
I'm posting for our IT department, as they are trying to write a program for people in Engineering. Below is the problem.

ReferenceNotFoundNotify / SetMissingReferencePathName
example needed. We are running SW03, SP1.

I have tried a number of different combinations of basically the same code below. The simplest form I have tried is:

Private Function swApp_ReferenceNotFoundNotify(ByVal fileName As String)
As Long
MsgBox (fileName & "Missing!")
swApp.SetMissingReferencePathName ("D:\SLDWKS\2\24535.SLDPRT")
swApp_ReferenceNotFoundNotify = False
End Function

I have tried this both as an add-in macro, and as a standalone .exe. In all cases, I get the same results:
* No Error from VB;
* The message box appears as expected;
* The SetMissingReferencePathName call and return value have no effect.

The D:\SLDWKS\2\24535.SLDPRT file does exist, and is actually 24535revB.SLDPRT renamed. SolidWorks is looking for 24535revB.SLDPRT, but I want to give it the new name.

Unfortunately for us, the renaming of thousands of files has already taken place - using Windows Explorer. I am hoping that I can use this technique to re-establish links to the proper files.

Thanks for taking the time to look at this.

Wanna Tip? faq731-376
"Probable impossibilities are to be preferred to improbable possibilities."
 
Nevermind, our IT guy figured this out. After he gets things finalized, I'll share the code.

Wanna Tip? faq731-376
"Probable impossibilities are to be preferred to improbable possibilities."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top