1

i am a newcomer to the Autodesk development community, and as such i have been following the tutorial related to viewing BIM360 and fusion models. After having completed the tutorial, and trying to run, my program, i get the exception "System.NullReferenceException: 'Object reference not set to an instance of an object.'

credentials 5__1 was null."

as shown in the image

Point of exception

Even though this exception occours, i am still able to continue the debugging session, and i am able to log in to autodesk. However after this login i am faced with this:

Tree view, unpopulated

For context: in the tutorial this view, is populated with the different projects associated with the account, used for the login. In my case, despite the account being an admin of a project, i am not able to see said project in this view, which is my goal

My question is then, could the exception be the root course for the fact that my view is unpopulated(I.e not showing my projects)? And if so, any idea on how to resolve the issue?

I tried to resovle it myself, and found this question, with a similar premise: Forge API NullReferenceException with Credentials.FromSessionAsync()

I tried following, the code, as posted for an answer, and i found out, that the code marked in 1 does indeed execute before the handler for the "api/forge/callback/oauth" path, however the handler is still executed, and i can see the credentials variable being given a value(And as can be infered from 2 i am able to log in)

Thank you for reading my question, and if i have violated some manners regarding posting question, i do apologise

1 Answers1

0

You are missing the request to enable Custom Integrations tab in your BIM 360 account. But this made me realize we need to be a bit more clear on this being a pre-requisite for the use of that sample. Thanks for pointing out.

Here are the steps you need to follow - https://fieldofviewblog.wordpress.com/2017/08/18/no-custom-integrations-tab/

Here how to activate once you have that tab enabled. https://fieldofviewblog.wordpress.com/2017/01/19/bim-360-activating-api-access-to-docs/

Jaime Rosales
  • 1,106
  • 1
  • 6
  • 8
  • Alright! thank you for this answer, Looks like i currently dont have account administrator priviledge, so i will be back, once that is sorted! – martin opal Mar 24 '21 at 10:02
  • Hey again Jaime! its took a long time due to vacation and whatnot, but the app should be integrated, however i am still not able to view, the models. It should be noted, however, that i am able to see some models i made in Fusion, and always have been, but still not the bim360 projekt, that the app i integrated for – martin opal Apr 28 '21 at 10:18
  • Hmm ok, might be easier to check it out in a call. send me an email to jaime.rosales.duque@autodesk.com – Jaime Rosales Apr 29 '21 at 19:53