EverseDevelopment / dynamo-dynaforge-package

An Autodesk Forge extension for Dynamo
https://www.e-verse.com/
MIT License
9 stars 2 forks source link

Hubs.Get node does not return anything #1

Closed nicobrownHL closed 2 years ago

nicobrownHL commented 2 years ago

Thanks for the packages but I've got an issue, I downloaded from the package manager in dynamo.

The Auth node returns its token but this doesn't work with the hubs.get which just returns empty. I also checked with our in-house Auth token node but still nothing.

image

I've also had an issue with the StorageLocation.Create node

image

I'm trying to access and eventually upload a Revit file to BIM 360, will these nodes be able to do this?

vnoves commented 2 years ago

HI @nicobrownHL , thanks for your interest in DynaForge.

  1. Regarding the Hubs.Get node, did you already created a Forge app and then added the custom integration to BIM360?

image

  1. Please confirm the above so then we can check the StorageLocation.Create node

  2. Yes, it's the idea that you will be able to upload files to BIM360. We will be soon releasing a new version of the nodes with more functionality too. Any suggestions are always accepted :)

nicobrownHL commented 2 years ago

Hi Valentin,

I've edited this comment twice now but I've generated an app with just a local callback location as described above and its working but I'm still having an issue trying to upload a file. Are these nodes in the correct order and are the inputs correct? image

vnoves commented 2 years ago

Hi @nicobrownHL

I think you are not using the nodes in the correct order.

  1. Get your token with Authenticate.Auth Node
  2. Get you desired hub id with Hubs.Get Node. Always select the middle option(hub_id)
  3. Get a project with the Projects.Get Node

image

  1. Get a folder ID, you can use the TopFolderContent.Get
  2. Create an storage for your file with the StorageLocation.Create

image

  1. Upload a file from your computer using the FileUpload.Run
  2. Finally Create the file in BIM360 with FileCreate.Run

image

Let me know if that works

nicobrownHL commented 2 years ago

Ok I built it with the nodes as above and its fine so apologies for wasting your time. I was trying to skip some of the inputs by cutting and pasting the web address into the graph and then processing them as strings to get the desired project and folder ID to simplify the graph a bit, but even though they match the ID output of the nodes they don't seem to work. I'll create some DS UI forms for the project and folder selections for those who aren't so dynamo savvy. Thanks for making these packages, super useful and something we've been trying to look at for ages.

vnoves commented 2 years ago

I'm glad it is working now. Thanks for the feedback, I will create a wiki for the project with examples like this one, so it is easier to understand how to do certain actions.

Regarding the DS UI Forms, that is a great idea, I look forward to the PR! :)