Request

Response

    Manufacturing Data Model API Code Samples

    This page provides practical code samples for common tasks using the Manufacturing Data Model API.

    These examples help you get started with:

    • Retrieving model hierarchies
    • Finding thumbnails
    • Getting physical properties from your design data
    • Using custom properties
    • Searching within Hubs

    Prerequisites

    Before you begin, make sure you have the following:

    APS Account Setup

    • An APS Account with an active subscription
    • A created app in your APS account
    • Follow the APS getting started tutorial if you need help setting this up

    Development Environment

    • Node.js version 16.13.2 or higher
    • Basic understanding of JavaScript

    GitHub Repository

    The APS Manufacturing Data Model Samples repository contains comprehensive code samples for the Manufacturing Data Model API.

    Repository Structure

    • Each sample demonstrates a specific API functionality
    • Samples are organized into separate folders
    • Every folder contains a README with step-by-step instructions
    • Designed for Node.js environment using the Autodesk Forge SDK

    Common Requirements for All Samples

    All samples require:

    • Hub ID
    • Project ID
    • File ID

    Available Code Samples

    Sample 1: Read the Complete Model Hierarchy of a Design

    What it does:

    Retrieves and displays the complete model hierarchy of a design, similar to what you see in Fusion.

    Additional requirements:

    None - uses the common requirements above.

    Repository Link:

    Read the Complete Model Hierarchy of a Design


    Sample 2: Find the Thumbnail of a Specific Part

    What it does:

    Finds and retrieves the thumbnail image of a specific part in a design.

    Additional requirements:

    None - uses the common requirements above.

    Repository Link:

    Find the Thumbnail of a Specific Part


    Sample 3: Get Physical Properties for a Component

    What it does:

    Retrieves physical properties of a specific component in a design.

    Properties included:
    • Bounding box dimensions
    • Mass calculations
    • Other physical characteristics
    Additional requirements:
    • Component identifier (to specify which component’s properties to retrieve)
    Repository Link:

    Get Physical Properties for Component


    Sample 4: Use Custom Properties

    What it does:

    Demonstrates how to create, read, update, and delete custom properties on components using the Manufacturing Data Model API.

    Additional requirements:

    None - uses the common requirements above.

    Repository Link:

    Use Custom Properties


    Sample 5: Search in Hub

    What it does:

    Searches for Components, Models, Files, and Folders within a Hub using free-text lookups, property-based filtering, or type-scoped searches.

    Additional requirements:

    None - uses the common requirements above.

    Repository Link:

    Search in Hub