Search code examples
autodesk-forgeautodesk-model-derivative

Autodesk Model Derivative API: Revit to IFC translation with exportSettingsName option does not create PSET in 2023 files


I am translating revit files (.rvt) to IFC (.ifc) files using the model derivative API. I am setting attributes as described in the section "Attributes that Apply to IFC Outputs" in the documentation, namely exportSettingName (formats.advanced.exportSettingName). Here, I pass the name of the IFC export setting as stored in the Revit file to translate.

This export setting has the "Export schedules as property sets" set to true, also its sub-option "Export only schedules containing IFC, Pset, or Common in the title" set to true.

The Revit file also contains a schedule (named starting with IFC_).

When using the API to translate a Revit File of the version 2021, the API yields the expected result, ie. an IFC file with a custom PSET named like the schedule and containing all the properties described in the schedule.

However, after migrating this file to 2023, the API does not yield the expected result anymore, ie. creates an IFC file without this PSET.

Was there a change in the API or in the way the export settings need to be stored in the revit file?


Solution

  • It turns out (thank you Eason for the comprehensive response and information via email) that there is no way to pass custom export settings in Revit 2023 files.

    To be more precise, the Model Derivative API does not (yet) support the format that Revit 2023 (the 2023 IFC Addin) writes the settings into the model. A revit file that was migrated from Revit 2021 to Revit 2023 can have Model Derivative API compatible custom IFC settings until the settings are changed (which was the problem in our case).

    For more details follow the blog post in Eason Kangs first comment to the question.