It's a topic that comes up quite often so we'll provide a high level overview of what's possible using components of Autodesk Platform Services (formerly known as Forge)
Building a configurator using APS
1) Process your current design (if there is one) using the Model Derivative service
- Typically you start by processing your design file(s) using the Model Derivative service into SVF (or SVF2), a format optimized for loading and displaying in the Viewer. You can think of this format as a PDF file generated from a Word document. It's meant to be portable and easy-to-view on different platforms, but it's not meant to be edited.
- If there’s no starting design (let's say you want to create new designs instead of modifying existing ones), proceed directly to step 3.
2) Load the design into a customized viewer
- Here's a couple of learning resources related to different types of customizations:
3) Track changes
- Modifications from the previous step are not persisted, they're only applied to the data that's been loaded into the memory of the viewer application.
- Therefore, your application will need to track all the changes made by the user, and store them so that they can later be applied to the original design file.
- You are free to store the tracked changes in any way you want. We suggest using a simple format (for example, TXT or JSON) that can be easily read in your plugin code in the next step.
4) Submit the tracked changes (together with the original design if there’s one) to a Design Automation
- In this step you'll want to take the changes the user made to your SVF file in the viewer, and apply them to the original design file the SVF was generated from.
- A common approach is to use the Design Automation service which allows you to execute your custom Revit, Inventor, AutoCAD, or 3ds Max plugin in the cloud.
- You can develop a plugin for one of the mentioned CAD applications that will read the tracked changes generated by your client-side application, and apply them to the original design (or create a new design if needed).
- Here's a couple of links to learn more about the Design Automation service:
- Note, however, that the roundtrip to the Design Automation service may take some time. This is explained in more detail in the Response time section below.
5) Retrieve the updated design file, and repeat from step 1
We could group configurators based on the response time:
- real-time: as the user changes properties the model updates in real time, within less than a second
- near real-time: the model updates within a few seconds
- batch processing: the update can take longer
1) Batch processing
If you don't have strict time constraints, then you can just provide the available options for the user, then send the new parameter values to Design Automation to generate a new model, and then display its SVF version in the Viewer.
This is the most generic and powerful way of doing model updates, but it can take time to get back the results.
Here is a blog post on the most comprehensive sample we have for using Design Automation API: Configurator 360 to Design Automation
There are many other samples as well using other engines, e.g.: Design Automation - Revit Window Family Creation Sample
2) Near real-time
There is a new feature that can speed things up if you are willing to pay the extra cost. This is now in production for the Revit engine but still in preview for the others at the time of writing this blog post: Open Network in Preview
In this case you would have to rely on the Viewer to do the changes without using Design Automation. This limits the possibilities since you cannot take advantage of the parametric solver of our desktop products: cannot do e.g. complex geometry changes.
The main things you can do are:
- material changes (see Material swatches in Forge Viewer)
- visibility changes: show/hide components (see Hidding completely viewer nodes (no ghosting))
- product assembler: adding other models to the main model (see forge-assembly-configurator)
These changes are not saved back into the original model though, so if that's also needed, then you would still have to use Design Automation to generate the updated models.
The changes are not even stored in the SVF file that was generated for the model - you would have to store them yourself if you want to show the modified model to the user later on. Each time you load the model you would have to reapply those changes: material change, position change, etc
It's up to you how and where you store all that information.