Support for BCF API

Support for BCF API

Anonymous
Not applicable
2,291 Views
13 Replies
Message 1 of 14

Support for BCF API

Anonymous
Not applicable

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

Accepted solutions (2)
2,292 Views
13 Replies
Replies (13)
Message 2 of 14

jeremytammik
Autodesk
Autodesk
Accepted solution

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
Autodesk
Autodesk

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

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

Thank you for your response, great information.
0 Likes
Message 5 of 14

Anonymous
Not applicable

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?

0 Likes
Message 6 of 14

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 7 of 14

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 8 of 14

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 9 of 14

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 10 of 14

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 11 of 14

jeremytammik
Autodesk
Autodesk

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

Anonymous
Not applicable

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

 

- Brian

0 Likes
Message 13 of 14

jeremytammik
Autodesk
Autodesk
Accepted solution

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

Anonymous
Not applicable

Brilliant!  This is awesome Jeremy!

 

- Brian

0 Likes