OSArch Community

[BlenderBIM] Authoring IFC Files for Revit

  1. L

    Sorry, I didn’t explain that clearly enough: One wall type for multiple walls (of the same type).

    The reason: Although FME has an Ifc Writer, it doesn't create Types or Materials.

    The code samples wiki page and this IfcOpenShellAcademy post do not mention the api. Those were the two pages I based my code on! Even the API-Documentation doesn't have api in it, except for the title! It would be nice to refer to something that had the same structure as the GitHub code.

    The way the api is structured around use-cases makes sense.

    My use-case is to create Ifc files from scratch with data derived from two different sources: Corrupt Revit files and processed CAD floor plans. Using FME, I am able to translate the data and geometry into any format. At first I let FME's IfcWriter do most of the authoring, taking the output, adding walltypes and anything else missing. That is still a useful process, but recently, one of the FME experts advised me to create a plugin that would function as a _custom _Ifc Writer. That is another level of complexity, but it would give me more control from the beginning instead of fixing it after the fact.

    FME processes data differently than coding: Each piece of data (object, geometry, wall, raster image, etc) is an individual feature with attributes. They flow through the workspace one-by-one, like an assembly line. Looping is rarely needed. It's very powerful by itself, but you can add python scripts for more functionality. Referencing my screenshots from above, inside the PythonCaller transformer is a script where you can reference attributes from features directly into the script by double-clicking:

    That is just one of several ways to use python in FME.

    To that end:

    • If the api creates owner history and other "details" automatically, how does it get IfcPerson, Organization, Address, etc?

    • If the function of the api is to interact with the Ifc database (do you mean file?), does it require an Ifc file to start with?

    • Should I be able to author an Ifc file from scratch solely by using the api?

    • Looking at your code for the walltype, it looks like it is all key=value pairs and the "file" reference. No positional arguments allowed?

    Thank you for the insights. I am starting to understand what to look for. If you know of any more code samples, that would be very helpful.

    Have a great weekend!

  2. L

    Hello everybody,

    I've been making progress. For those interested, here is my GitHub repository. This will be my first project in GitHub. File organization TBD.

    So far, I've created walls that import Revit as a Family Type, using this as a template with a number of property and material sets. For now, I am reading in a simple Revit model as test data. At some point I will hook up FME Workspace no-code stuff that interprets CAD floor plans into Revit data.

    Because Revit is so problematic with IFC, especially geometry, I am looking to limit it to extrusions or bounding boxes. Can I get away with ignoring all geometry and just reference Families/Family Types? Stay tuned.

    By embedding Revit-centric data, like API arguments or DesignScript commands, I could use them later in a plugin or Dynamo script. That's the idea anyway. Feedback appreciated!

    Thanks

    Loren

  1. Page 1
  2. 2

Login or Register to reply.