Skip to content

yiskang/DA4R-revit-ifc-linker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Revit IFC Linker App bundle for Autodesk APS Design Automation

Design Automation

Revit .NET Revit

Advanced MIT

Description

This sample demonstrates how to link IFC files into host RVT file on Design Automation using the Importer of Revit.IFC.Import.dll from Revit software. In this sample, we use the one from Revit 2022 software by reference (not-copy-locally).

Notice

Commonly, Revit.IFC.Import.dll can be found in Revit installation location, but in case any changes and updates in this DLL, you can also find its source code under the path Source /Revit.IFC.Import of Autodesk revit-ifc open source addin.

Development Setup

Prerequisites

  1. APS Account: Learn how to create a APS Account, activate subscription and create an app at this tutorial.
  2. Visual Studio 2022 and later (Windows).
  3. Revit 2022 and later: required to compile changes into the plugin.

Design Automation Setup

AppBundle example

{
    "id": "RevitIfcImporter",
    "engine": "Autodesk.Revit+2022",
    "description": "Link IFC into host RVT"
}

Activity example

{
    "id": "RevitIfcImporterActivity",
    "commandLine": [
        "$(engine.path)\\\\revitcoreconsole.exe /al \"$(appbundles[RevitIfcImporter].path)\""
    ],
    "parameters": {
        "hostRVT": {
            "verb": "get",
            "description": "The ifc will be linked to host",
            "required": true,
            "localName": "host.rvt"
        },
        "inputIFC": {
            "verb": "get",
            "description": "The ifc will be linked to host",
            "required": true,
            "localName": "$(inputIFC)"
        },
        "output": {
            "zip": true,
            "verb": "put",
            "description": "The link result",
            "localName": "output"
        }
    },
    "engine": "Autodesk.Revit+2022",
    "appbundles": [
        "Autodesk.RevitIfcImporter+dev"
    ],
    "description": "Activity for linking IFC to Host RVT"
}

Workitem example

{
    "activityId": "Autodesk.RevitIfcImporterActivity+dev",
    "arguments": {
        "hostRVT": {
            "verb": "get",
            "url": "https://developer.api.autodesk.com/oss/v2/apptestbucket/9d3be632-a4fc-457d-bc5d-9e75cefc54b7?region=US"
        },
        "inputIFC": {
            "verb": "get",
            "url": "https://developer.api.autodesk.com/oss/v2/apptestbucket/97095bbc-1ce3-469f-99ba-0157bbcab73b?region=US"
        },
        "output": {
            "verb": "put",
            "url": "https://developer.api.autodesk.com/oss/v2/apptestbucket/9d3be632-a4fc-457d-bc5d-9e75cefc54b7?region=US",
            "headers": {
                "Content-Type": "application/octet-stream"
            }
        }
    }
}

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Eason Kang @yiskang, Autodesk Developer Advocacy and Support

About

Sample Revit Addin for linking IFC into host RVT via the Design Automation for Revit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages