Batch Replace family text file in multiple rfa files

Batch Replace family text file in multiple rfa files

Anonymous
Not applicable
638 Views
2 Replies
Message 1 of 3

Batch Replace family text file in multiple rfa files

Anonymous
Not applicable

Hello.  I am hoping this is an easy to solve issue I am having. 

 

I have hundreds of individual rfa files where I need to replace the family text file that is loaded/associated with each of them.  Normally I would open each file individually, go to Insert, Import Family Types, select the new Family text file, save the file then exit. Is there a way to batch/automate this? I don't want to open each file individually and do this.

 

I have seen batch files that have a journal file that opens each file, saves them and exits, then loops and does that for every file in the directory. Is there a way to add a command to this journal file that would import/load a new family text file?

 

Any suggestions would be appreciated.

0 Likes
639 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

I tried to edit my post, but was unable to.  I don't think the journal file has anything to do with what I am trying to accomplish.  I have a batch file that will batch upgrade an entire directory of files.  It opens each file, upgrades it(?), then closes and saves the file.  Is there a way to insert a command in there somewhere to load a new Family text file into each file before saving and exiting?

 

0 Likes
Message 3 of 3

RPTHOMAS108
Mentor
Mentor

I don't think journals are the correct approach. The whole journal system I believe was created so you could send your file to the people who would then run your Revit session to diagnose a problem you had. If you manually go through the process for one file you'll probably find (after you've cleaned up the jumble) how viable that would be via copy and paste.

 

Seems you would be better off doing via the API but there are complications such as ensuring you don't try and close the last document. Dynamo is usually per project so I don't know how viable it is to switch between projects during a run but since automation often requires this kind of behaviour such a limitation may have been overcome by now.

0 Likes