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:Ā 

Support for BCF API

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
bkj102070
1200 Views, 13 Replies

Support for BCF API

Can anyone answer if Revit supports the BCF API to allow for third party integrations?

13 REPLIES 13
Message 2 of 14
jeremytammik
in reply to: bkj102070

I searched the Internet for 'bcf api' and found this:

 

https://github.com/BuildingSMART/BCF-API

 

Is that what you are talking about?

 

Being a REST API, you can use it perfectly well from your own .NET add-ins.

 

The BCF API GitHub repo points to a C# client:

 

https://github.com/rvestvik/BcfApiExampleClient

 

You can try integrating that very code into a Revit add-in and see how it goes.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 14
jeremytammik
in reply to: bkj102070

Out of interest, I took a slightly deeper look.

 

I see that BCF stands for BIM Collaboration Format.

 

I also see that the C# sample can easily be integrated into a Revit add-in.

 

Cheers,

 

Jeremy

 

 

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 4 of 14
bkj102070
in reply to: jeremytammik

Yes the BCF Rest API is what I was asking about.

Thank you for your response, great information.
Message 5 of 14
bkj102070
in reply to: jeremytammik

Another question: Can you tell me if the Revit API will create the JSON for us or would we be required to create it via the addin?

Message 6 of 14
jeremytammik
in reply to: bkj102070

I was not aware of BCF until you raised this question, and I am pretty sure that Revit does nothing to support it.

 

So if the JSON is BCF specific, you will probably have to create it with your own custom add-in.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 7 of 14
jeremytammik
in reply to: bkj102070

Please take a look at my new project:

 

https://github.com/jeremytammik/RvtBcfApiExampleClient

 

How can I obtain the required BCF API access credentials to test it?

  

  string clientId = "YOUR_CLIENT_ID";
  string clientSecret = "YOU_CLIENT_SECRET";

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 8 of 14
jeremytammik
in reply to: jeremytammik

One step forward...

 

https://github.com/BuildingSMART/BCF-API

 

tells me that "Your applications 'ClientID' is the username, your 'ClientSecret' is the password."

 

That begs the next question:

 

Where can I obtain the required user name and password?

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 9 of 14
jeremytammik
in reply to: jeremytammik

I completed my Revit sample app.

 

It works, or to be more precise:

 

It fails in the exact same way as original BCF-API sample, in the line:

 

  login.ShowDialog();

The error message says:

 

  Serverfehler in der Anwendung /.
  Die Ressource kann nicht gefunden werden.
  Beschreibung: HTTP 404. Die gesuchte Ressource oder eine ihrer AbhƤngigkeiten wurde mƶglicherweise entfernt, umbenannt oder ist vorĆ¼bergehend nicht verfĆ¼gbar. ƜberprĆ¼fen Sie folgende URL, und stellen Sie sicher, dass sie richtig geschrieben wurde.
  Angeforderter URL: /bcf/f

It looks like this:

 

BcfApiExampleClient_login_error.png

 

As said, exact same behaviour in both the original BcfApiExampleClient and my Revit add-in RvtBcfApiExampleClient, so I count that as a success.

 

I raised an issue for the failure in the original sample:

 

https://github.com/rvestvik/BcfApiExampleClient/issues/2

 

Do you or Jim have any connections to ensure that it is attended to?

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 10 of 14
jeremytammik
in reply to: jeremytammik

Good news.

 

I received a reponse to the issue I raised, saying "a few things in the Api have changed since the example client was written. I'll see to get a small working example by the weekend":

 

https://github.com/rvestvik/BcfApiExampleClient/issues/2

 

I'll be back...

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 11 of 14
jeremytammik
in reply to: bkj102070

The stand-alone BcfApiExampleClient has been updated now and works again:

 

https://github.com/rvestvik/BcfApiExampleClient

 

I adapted the Revit version of it, retested, and it works fine too:

 

https://github.com/jeremytammik/RvtBcfApiExampleClient

 

Please also note this comment by Georg Dangl:

 

https://github.com/rvestvik/BcfApiExampleClient/issues/2

 

He says: In December we had another Hackathon in Munich where Veni Lillkall created a small sample app in C#:

 

https://github.com/BIMit/BCF-Hackathon-Munich/tree/Team_C%23

 

This might give you some ideas how to use the BCF API itself.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 12 of 14
bkj102070
in reply to: jeremytammik

This is great Jeremy.  Thank you for your work on this.

 

- Brian

Message 13 of 14
jeremytammik
in reply to: bkj102070

Dear Brian,

 

I published a summary of the results and the pointer to GitHub now:

 

http://thebuildingcoder.typepad.com/blog/2016/05/bcf-api-and-manually-setting-up-an-add-in.html

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 14 of 14
bkj102070
in reply to: jeremytammik

Brilliant!  This is awesome Jeremy!

 

- Brian

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community