Import an IFC2X3, IFC4 or IFC4X3, convert the file to IfcJSON and store the data in the database
Feature Group: Workflow
Execution of a series actions: convert to IfcJSON, filter the IfcJSON and store the data in the database
This workflow executes the previous features:
Submit the processing request
Import is started by sending a POST with a Json Body as defined in pydantic
#
# Import an IFC, convert it to an IFCJSON and store the data in the database
#
class ImportAndProcessIfc_Instruction(BaseModel):
source: ConvertIfcToIfcJson_Instruction
filter: Filter_Instruction | SkipJsonSchema[None] = None
store: Store_Instruction
class ConvertIfcToIfcJson_Instruction(BaseModel):
sourceFileURL: str | None = "http://localhost:8002/IFC_SOURCE_FILES/Duplex_A_20110907_optimized.ifc"
class Filter_Instruction(BaseModel):
filter:IfcJsonFilter
class FilterIfcJson_Instruction(BaseModel):
sourceFileURL: str | None = "http://localhost:8002/IFCJSON/597e4482-c5ab-4f8d-a02b-e7db99a14a37_NI.json"
filter: IfcJsonFilter
class Store_Instruction(BaseModel):
spatialUnitId: str | None = "5f2d17b0-43fb-445d-9c67-7dafb3292c33"
bundleName: str | None = "Duplex_A_20110907_optimized" # name of the bundle
parentBundleId: str | None = None # remove parentBundleId if there is no parent
# ImportAndProcessIfc_Result will be available in the
# ConvertIfcToIfcJson_Result
# FilterIfcJson_Result (if filter is not None)
# StoreIfcJsonInDb_Result
FastAPI provides by default at /docs a swagger utility that simplifies the execution of tests.
The request provides:
- default values (from None = ) that must be adjusted to your specific case
- the filter if needed (more on that in filter the model)
Hereunder a screenshot of the request available at /docs
Hereunder a screenshot of the request skimmed form filter and parentBundleId, typically not needed for a primary import.