By Shiya Luo
Outputs from Inventor can have one file, or multiple files with one master assembly and one or more sub-assemblies. These sub-assemblies can also be master assembly for other assemblies.
This post will walk you through how to set references with Inventor files that contains multiple assembly files with some examples.
Here I have downloaded Inventor 2016 Sample Files from the Autodesk Inventor Sample Files Page.
To display your entire model with multiple files, here are the steps you’ll have to take:
1. upload the individual files to your bucket
2. link the files together using reference API
3. register them individually for translation
Here are a few helpful resources to use to get this working:
Use Postman or some other REST API tools, or this interactive guide that contains the workflow of View and Data APIs.
Read the documentation.
The example I'm demonstrating is Models/Assemblies/Scissors. Opening up scissors.iam in inventor you'll get something that looks like this:
Here's a download link for those who aren't using windows and can't extract .exe:
Here, the master file is "scissors.iam", which has three sub-assemblies or children files called "blade_main.ipt", "blade_top.ipt" and "scissor_spring.ipt". On the left panel in Inventor here is the relationship:
One tiered relationship is easy, just set the parent file as master, and list all three dependencies like so:
POST /references/v1/setreference HTTP/1.1
Host: developer.api.autodesk.com
Authorization: Bearer <access-token>
Content-Type: application/json
Cache-Control: no-cache
{
"master" : "urn:adsk.objects:os.object:shiyas-bucket-100/scissors.iam",
"dependencies" : [
{ "file" : "urn:adsk.objects:os.object:shiyas-bucket-100/blade_main.ipt",
"metadata" : {
"childPath" : "blade_main.ipt",
"parentPath" : "scissors.iam"
}
},
{ "file" : "urn:adsk.objects:os.object:shiyas-bucket-100/blade_top.ipt",
"metadata" : {
"childPath" : "blade_top.ipt",
"parentPath" : "scissors.iam"
}
},
{ "file" : "urn:adsk.objects:os.object:shiyas-bucket-100/scissor_spring.ipt",
"metadata" : {
"childPath" : "scissor_spring.ipt",
"parentPath" : "scissors.iam"
}
}
]
}
Each JSON object in the "dependencies" array should be a child of the parent assembly. If you've set your references correctly, you should get something that looks like this:
Comments
You can follow this conversation by subscribing to the comment feed for this post.