An element to .RFA

Anonymous

An element to .RFA

Anonymous
Not applicable

Hello, I need to get an RFA file from an element, to upload the file in an API.

0 Likes
Reply
Accepted solutions (2)
1,367 Views
13 Replies
Replies (13)

lukaskohout
Advocate
Advocate

What type of element? And what do you mean by uploading the file in API? Can you describe what are you trying to achieve?

 

It is not as easy as it sounds. At first you need to know what can be done manually in the Revit UI. In most cases you will be able save it only as RVT (Revit project file).

 

System families and its types cannot be saved as RFA file.

Other loaded families can by default.


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
0 Likes

Anonymous
Not applicable

okey, I have an element, such as a wall and I need to upload the wall element to the web, with its api.

0 Likes

lukaskohout
Advocate
Advocate

Do you mean Forge, BIM360, webGL or what type of web?

Geometry or information or both? Can you not use IFC?

 

Just getting wall and uploading it as RFA will not be possible, you can store it only in project.


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
0 Likes

Anonymous
Not applicable
No, es una web personal.
0 Likes

lukaskohout
Advocate
Advocate

Then you need to transform Revit element to some format that the web can show - e.g. webGL.

There is no native way through API.


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
0 Likes

Anonymous
Not applicable
I can't create an object, so the object becomes an autodesk revit family and output the .rfa file, because if I search for .rfa there are object files like a wall.
0 Likes

lukaskohout
Advocate
Advocate

I am sorry I do not understand your workflow, could you post some example?


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
0 Likes

Anonymous
Not applicable
I have a project, in my plugin I have a list with all the objects of the project, you choose one or several objects and I have to upload that object to the web, which collects a file.

0 Likes

lukaskohout
Advocate
Advocate

And the objects are Revit elements? If so, my first reply stands.

You cannot save e.g. wall as RFA.


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
0 Likes

Anonymous
Not applicable
not a wall, but a window.
0 Likes

lukaskohout
Advocate
Advocate
Accepted solution

Then you need to get the family of the window and the you can save it to whatever path you want and then upload.

Element e;
FamilyInstance fi = e as FamilyInstance;
Family f = fi.Symbol.Family;
Document famDoc = doc.EditFamily(f);
famDoc.SaveAs("your path");

https://www.revitapidocs.com/2020/c605e437-5f18-81a5-d4ed-e664ba4f941d.htm


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================

Anonymous
Not applicable
Fails in saves as, famDoc.SaveAs (@ "C: \ Users \ victo \ Desktop \ project"); Autodesk.Revit.Exceptions.FileAccessException: 'The model could not be saved: Access Denied. (COleException 0x80030005) '
0 Likes

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @Anonymous ,

You have to provide the file name to save it as a .rfa file.

 famDoc.SaveAs(@"C: \ Users \ victo \ Desktop \ project \ YourFileName.rfa");

I hope this helps. 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network