Reply

Tip Revision Manager - How to don't break link

I used Revision Manager for copy Parts and a Assembly...

 

Example

 

Dim revApp As RevisionManager.Application = CreateObject("RevisionManager.Application")

Dim revDoc As RevisionManager.Document = revApp.Open(path)

Dim revLinks As RevisionManager.LinkedDocuments = revDoc.LinkedDocuments

For item_count As Integer = 1 To revLinks.Count

Dim revLink As RevisionManager.Document = revLinks.Item(item_count)

Dim reName As String = revLink.FullName

reName = reName.Replace(path)

revLink.Copy(path)

Next

revDoc.Copy(path)

revApp.RedefineLinks(SePath, path, , , True)

If openFile.EndsWith(".par") Then

revDoc = revApp.Open(path)

revDoc.Rename(path)

End If

revApp.Quit()

 

But if the file is Assembly than Occurrences link is broken so I add this code....

 

revApp.RedefineLinks(path (Before), path (After), files, , True, False)

 

'path (Before)' is broken link path (I don't know broken link path) with Assembly

'path (After)' is broken link path (Change path) with Assembly

'files' is all files (*.par, *.asm, *.psm, ...)

 

I used this function files = System.IO.Directory.GetFiles(path)

 

So I did't broken the link...

 

I hope many programmer settle the problem to use the function... Smiley Happy

 

Posted by: gmpark
Post date: 7/3/2013 10:52:03 PM