1

I want to put file .rfa into Forge DesignAutomation to use function LoadFamily create Special equipment by Revit. I don't know how to put it. Is it possible to upload the .rfa? And do i need to configure the activity, bucket or anything else ?

1 Answers1

0

You can send any data to Design Automation job, so that includes rfa files. You may follow any of our code samples (say count.delete) and modify it's activity definition to add an extra parameter and give it an hardcoded local name.

"inputRFA": {
    "verb": "get",
    "description": "Input Family",
    "localName": "input.rfa"
}

When you post your workitem, you can add the inputRFA argument to it with a downloadable link corresponding to the file. This will save your file on the worker machine in the working folder with the hardcoded name provided in the activity parameter input.rfa.

You may then load the family in your appbundle code using:

Family family = null;
document.LoadFamily("input.rfa", out family);

If your input.rfa is always the same for different jobs, you can instead save the family file(s) in the app bundle itself. See some ideas discussed in the blog.

Rahul Bhobe
  • 4,165
  • 4
  • 17
  • 32
  • I did it this way but there is this link (https://forge.autodesk.com/blog/store-template-documents-appbundle) I am stuck. The .rfa file I uploaded has a Japanese filename but when I upload it to the server it doesn't have the exact path I uploaded. How to fix it? This is my log in workItem : [03/21/2022 09:01:07] T:\Aces\Applications\2a49267f0450062feff0c6fa51de6097.tanpv.DemoTest11[1].package\CBBDesignAutomations.bundle\Contents\SM_A_01_�W���g.rfa – VU Nguyen Trong VTID9 Mar 21 '22 at 09:33
  • For a quick workaround, would it be possible to temporarily convert the filename to something simpler, like `a.rfa`? – Jeremy Tammik Mar 21 '22 at 11:39
  • @VUNguyenTrongVTID9, I checked WorkItem `2a49267f0450062feff0c6fa51de6097`, the job succeeded. What does you mean "when I upload it to the server it doesn't have the exact path I uploaded"? BTW, you don't have to package `RevitAPI.dll` in the appbundles. – Emma Zhu Mar 21 '22 at 16:03
  • @EmmaZhu My file must be in Japanese, so is there a way to keep it in Japanese? – VU Nguyen Trong VTID9 Mar 22 '22 at 03:50
  • @JeremyTammik T tried it successfully with non-Japanese files but i can only use file name japanese – VU Nguyen Trong VTID9 Mar 22 '22 at 03:53
  • @VUNguyenTrongVTID9, I understand your file must be in Japanese, but I don't understand what is your issue now. WorkItem `2a49267f0450062feff0c6fa51de6097` succeeded, I don't see any error in this job's log. Please clarify what you want exactly and then we can help. thanks. – Emma Zhu Mar 22 '22 at 05:46