Using iLogic to Export IFC issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I have created some rules in inventor that in short; uses a while loop to read parameters from an excel sheet, updates the parts in an assembly, exports the model as an IFC.
The issue I am having half the time they're coming out as an empty ifc at 14kb
I have put in delays in place which seem to have only a minor effect if any. I also wrote a retry script that checks the file size and if it is not over 20kb it retries up to 10x. This seems to have effect but producing thousands will not be suitable.
There is no logic to which ones are successful and which aren't I have ran a few test and it looks random.
The code I am using for exporting is below.
Dim oDoc As Document
oDoc = ThisApplication.ActiveDocument
Dim TheName As String
TheName = Name
Dim oFileName As String = "C:\Users\Matthew.Tanner\Downloads\IFC EXPORTS\" & TheName & ".ifc"
Dim oAsmDoc As AssemblyDocument
oAsmDoc = oDoc
oAsmDoc.ComponentDefinition.BIMComponent.ComponentDescription.FamilyType = "General Model"
oAsmDoc.ComponentDefinition.BIMComponent.ExportBuildingComponent(oFileName)
Any thoughts or ideas on what is causing this or what I can do to stop this from happening or to improve.
My best guess is that the code doesn't realize that the IFC hasn't completed exporting however increasing the sleep didn't seem to change anything.