Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

An element to .RFA

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
Anonymous
1325 Views, 13 Replies

An element to .RFA

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

Labels (3)
13 REPLIES 13
Message 2 of 14
lukaskohout
in reply to: Anonymous

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.
======================================================================
Message 3 of 14
Anonymous
in reply to: Anonymous

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

Message 4 of 14
lukaskohout
in reply to: Anonymous

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.
======================================================================
Message 5 of 14
Anonymous
in reply to: lukaskohout

No, es una web personal.
Message 6 of 14
lukaskohout
in reply to: Anonymous

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.
======================================================================
Message 7 of 14
Anonymous
in reply to: lukaskohout

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.
Message 8 of 14
lukaskohout
in reply to: Anonymous

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.
======================================================================
Message 9 of 14
Anonymous
in reply to: lukaskohout

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.

Message 10 of 14
lukaskohout
in reply to: Anonymous

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.
======================================================================
Message 11 of 14
Anonymous
in reply to: lukaskohout

not a wall, but a window.
Message 12 of 14
lukaskohout
in reply to: Anonymous

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.
======================================================================
Message 13 of 14
Anonymous
in reply to: lukaskohout

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) '
Message 14 of 14
naveen.kumar.t
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report