AnsweredAssumed Answered

EPDM vba get drawing's model fullpath

Question asked by Karel Varel on Aug 31, 2020
Latest reply on Aug 31, 2020 by Karel Varel


I have vba macro in excel that is meant to put list of drawings to specitic state. This is working great, but I need also drawing's models to be transfered to this state. This is my problem, I don't know how to get model fullpath for every drawing. I tried to check drawing's parents with IEdmReference5, but with no luck (failed on GetNextParent(PosOfFirstParent).

So this is working part of code that I have so far - Can someone help me to get drawing's model filename?


sub Batch_convert_drawings()

   Dim vault As New EdmVault5

   Dim vFile as IEdmFile5

   Dim vFolder as IEdmFolder5


   vaultname = vault.GetVaultNameFromPath("C:\$EPDM")

   vault.LoginAuto vaultname, 0


   For i = 1 to 2548

      Set vFile = vault.GetFileFromPath(Range("A" & i).value, vFolder)

      vFile.ChangeState "FINAL", vFolder.ID, "Batch processed", 0, 0

   next i