Request

Response

    Time Based History

    The Manufacturing Data Model now supports time-based history, enabling you to resolve objects at specific points in time. This feature enhances your ability to manage concurrency, track changes, and maintain the integrity of design data. With time-based history, each object’s state is driven by time. When fetching an object, you can pass a time parameter to retrieve the state of the object as it was at that specific moment. For example, you can fetch an object as it was yesterday at noon, and all elements within that object will be resolved to their state at that time. For more detailed information, please refer to Versions and changes in Autodesk Fusion documentation.

    ../../../_images/time_based_history.png

    Why Time Based History?

    Time-based history is essential for several reasons:

    • Concurrency Management: This feature allows multiple users to update properties or edit designs simultaneously without blocking each other. It improves workflow efficiency, as you do not have to wait for others to finish their changes.
    • Efficiency: Time-based history reduces the rapid creation of numerous versions, as versions are created only when you decide to do so.
    • Enhanced History Tracking: The HistoryChanges API provides a detailed view of all events affecting an object, ensuring transparency and accountability.

    Objects Utilizing Time-Based History

    Currently, the following objects utilize time-based history:

    • Model
    • Component
    • Drawing

    These objects are now time-based, allowing for detailed history tracking of changes.

    HistoryChanges

    The HistoryChanges API is a powerful tool for tracking changes and understanding the evolution of design data. It holds a list of HistoryChange objects that provide a detailed view of all events that have occurred to a given object over time. This includes updates to properties, descriptions, part number assignments, and more. HistoryChanges is now becoming an important aspect of managing design changes.

    Example Usage of HistoryChanges

    Example 1:

    The following query retrieves the history changes for a specific object identified by its ID.

    query getHistoryChanges ($objectId: ID!) {
        object(objectId: $objectId) {
            historyChanges {
                results {
                    id
                    type
                    timestamp
                    user
                    description
                }
            }
        }
    }
    
    Show More

    In this example, the query retrieves the history changes for a specific object identified by its ID. The response includes details such as the type of change, timestamp, user who made the change, and a description of the change. This information is crucial for understanding the history and evolution of design data, enabling better decision-making and collaboration among team members.

    Example 2:

    The following query retrieves the model object at a specific time, including its history changes.

    query GetModel($modelId: ID!, $time: DateTime) {
        model(modelId: $modelId, time: $time) {
            id
            name {
                value
            }
            history {
                results {
                    description
                    timeStamp
                  }
              }
                timestamp
            }
       }
    
    Show More

    In this example, the query retrieves the model object at a specific time. The response includes details such as the model’s ID, name, and history of changes. The timestamp indicates when the model was last updated. This information is essential for understanding the state of the model at a given point in time and for tracking changes over time.