Reply
Solved! Go to solution

RevisionManager.SetActionInRevisionManager

Dear All,

 

I'm trying to work with the function SetActionInRevisionManager of the revision manager class.

 

Its arguments are: SetActionInRevisionManager(nFileCount As Integer, ListOfInputFileNames As Object, ListOfInputActions As Object, Optional ListOfNewFileNames As Object = Nothing, Optional NewFilePathForAllFiles As Object = Nothing)

 

What i want my program to do is to open the revision manager, let it open an assembly and let it rename every occurence wich has a filename containing xx-xxxx to a drawing number like 99-9999.

 

I'm able to programatically open the revision manager and open the assembly in the manager with vb.net. the only thing i can't seem to get working is this SetActionInRevisionManager function.

 I create three lists:

RenameList:list of strings containing all fileNames i want to rename
RenameAction: list of same size with each element:

= RevisionManager.RevisionManagerAction.RenameAction

RenameToList: list of same size with all new file names

Directory: path of the directory.

 

Then i call

 

objRevisionManager.SetActionInRevisionManager(RenameList.Count, RenameList, RenameAction, directory)
It doesn't give me an error but nothing changes in the revision manager.

Am i using this function wrongly?
Thanks for your help.

Kr,

 

4 REPLIES
Solution
Solution
Accepted by topic author DVdw
‎09-18-2015 09:43 AM

Re: RevisionManager.SetActionInRevisionManager

I created PerformRenameAction sample for you on GitHub.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: RevisionManager.SetActionInRevisionManager

Thanks for your reply Jason.
Unfortunatly i'm working on an urgent project at the moment.
But i'm sure i'll find your example usefull.

I'll let you know when i got my program to work.
Kind Regards,
Vandewaerde David

Re: RevisionManager.SetActionInRevisionManager

I used this sample as the basis for a very useful application for our company to post-process the file names of a Teamcenter assembly export before sending to our fabricators.  It had to be done manually before so thanks a lot for the help!

Re: RevisionManager.SetActionInRevisionManager

[ Edited ]

Hi Jason,

Thanks a bunch,

I finay got it working.
So the arguments should be inserted as an array instead as a List Smiley Happy

 

Don't you agree it is a little confussing defining the function as following:

Function SetActionInRevisionManager(nFileCount As Integer, ListOfInputFileNames As Object, ListOfInputActions As Object, Optional ListOfNewFileNames As Object = Nothing, Optional NewFilePathForAllFiles As Object = Nothing)

ListOfInputFileNames

ListOfInputActions

ListOfNewFileNames

while in fact they should be are arrays instead of lists? Smiley Happy

 Ps: if you were to visit Belgium one day, remind me to buy you a drink!
You've been helping me out quite some times here and i really appreciate it!

 

Thanks a bunch!