18 Dec 2020

learnforge View Your Models - VB.NET

I wrote about migrating our C# .NET samples to VB.NETlearnforge Modify Your Models - VB.NET

You can do the same with any of our .NET projects, including View your models

Once you converted the project you'll have to do the same fixes as in the previous project:
1) Replace all "dynamic" words in the whole project with "Object"
Replace all "dynamic" with "Object"

2) Add "Imports System.Text" in one of the files
Add Imports System.Text

There was only one more thing that needed fixing. When trying to access objects from the responses for GetBucketsAsync() and GetObjectsAsync() then we cannot do it directly through a property, but have to pass the property name to the Dictionary(): e.g. instead of buckets.items we have to use buckets.Dictionary("items")
Change property access

And of course, just like in case of the original sample, you have to add your Forge App's credentials to the project:
Add credentials in project settings

Here is the finished project: https://github.com/adamenagy/Container/blob/master/learn.forge.viewmodels-VB.NET.zip  

Related Article

Posted By

Adam Nagy

Follow @AdamTheNagy Adam Nagy joined Autodesk back in 2005 and has been providing programming support, consulting, training and evangelism to external developers. He started his career in Budapest, then worked in Prague for 3 years and now lives in South England, UK. At the moment focusing on Inventor and Fusion 360, plus cloud and mobile related technologies. Adam has a degree in Software Engineering and has...