Reply

Copy an DFT with al linked documents with revision manager and VBA

Can someone help me?

I've tried to copy an draft with the revisionmanager and also rename this but when i copied it, the links are not update and point to the old draft.

 

        Dim application As RevisionManager.Application = Nothing
        Dim insight As RevisionManager.Insight = Nothing

        Try
            application = New RevisionManager.Application()
            insight = CType(application.Insight, RevisionManager.Insight)

            Dim FileName = "V:\Bibliotheek Nieuw (06-05-15 RK)\Panelen\Paneel vlak\paneel vlak.dft"
            Dim FilesToBeCopy = New Object(4) {}
            Dim DestinationPathsOfCopiedFiles = New Object(4) {}

            FilesToBeCopy(0) = "V:\Bibliotheek Nieuw (06-05-15 RK)\Panelen\Paneel vlak\paneel vlak.dft"
            FilesToBeCopy(1) = "V:\Bibliotheek Nieuw (06-05-15 RK)\Panelen\Paneel vlak\Buitenbak.psm"
            FilesToBeCopy(2) = "V:\Bibliotheek Nieuw (06-05-15 RK)\Panelen\Paneel vlak\Achterkant.psm"
            FilesToBeCopy(3) = "V:\Bibliotheek Nieuw (06-05-15 RK)\Panelen\Paneel vlak\EPS-HR.par"
            FilesToBeCopy(4) = "V:\Bibliotheek Nieuw (06-05-15 RK)\Panelen\Paneel vlak\paneel vlak.asm"

            DestinationPathsOfCopiedFiles(0) = "V:\Productie tekeningen\" & projectnummer & "\9. Producten in opdracht\" & TextBoxnaam.Text & " paneel vlak.dft"
            DestinationPathsOfCopiedFiles(1) = "V:\Productie tekeningen\" & projectnummer & "\9. Producten in opdracht\" & TextBoxnaam.Text & " Buitenbak.psm"
            DestinationPathsOfCopiedFiles(2) = "V:\Productie tekeningen\" & projectnummer & "\9. Producten in opdracht\" & TextBoxnaam.Text & " Achterkant.psm"
            DestinationPathsOfCopiedFiles(3) = "V:\Productie tekeningen\" & projectnummer & "\9. Producten in opdracht\" & TextBoxnaam.Text & " EPS-HR.par"
            DestinationPathsOfCopiedFiles(4) = "V:\Productie tekeningen\" & projectnummer & "\9. Producten in opdracht\" & TextBoxnaam.Text & " paneel vlak.asm"

            insight.CopyFiles(FileName, FilesToBeCopy, DestinationPathsOfCopiedFiles)
        Catch ex As System.Exception
            Console.WriteLine(ex)
        End Try

It copied the files to the new directory but the links are pointed to the old directory.

Knipsel.PNG

 

 

 

Can someone help me out?

Many thanks!

 

1 REPLY

Re: Copy an DFT with al linked documents with revision manager and VBA

HI,

 

You need use "Replace" command.

 

After craeted new copy then use Replace command.

 

See below link

 

https://community.plm.automation.siemens.com/t5/Solid-Edge-Developer-Forum/Revision-Manager-Copy-bot...