Allplan Fórum

[Otázka] How to export IFC 2x3 with the pythonscript API ?

Tagy:
  • Pyton
  • PythonParts
  • Scripting
  • [AIDP-208959]

Hi!
I checked the new documentation and example for exporting/importing ifc files, but it only seems to work with the IFC4 version not with the IFC2x3.

I tried the example addon here:
…\etc\Examples\PythonParts\BasisExamples\ExportImport\IfcExportImport.pyp
…\etc\PythonPartsExampleScripts\BasisExamples\ExportImport\IfcExportImport.py

When I select the wanted version with a default 2x3 translator file and press execute nothing happens, not even a new line in the Trace window.

When I try to save ifc4 it works fine but I really need 2x3.
Any suggestions ?

doc here:
file:///C:/ProgramData/Nemetschek/Allplan/2023/Etc/PythonPartsFramework/PythonPartsDoc/DocFiles/CadDataExportImport/ExportIFC.html

Show most helpful answer Hide most helpful answer

Hello,

sorry for the problem. Due to an internal refactoring in the IFC part of Allplan 2023 the Ifc_2x3 export has been disabled for the use by the Python API. We are trying to fix the issue as soon as possible.

Best regards
Horst

1 - 10 (13)

Hi,

According to the doc, IFC2x3 is correctly supported.

Best

Přílohy (1)

Type: image/png
Staženo 31
Size: 21,65 KiB

Same problem, nothing append with IFC2x3...

In the py file IFC4 is forced :

build_ele.IfcExportTheme.value = AllplanSettings.AllplanPaths.GetEtcPath() + r"Favoriten Standard\IFC\Ifc_4_standard_export_DEU.nth"

I've already tried changing that hardcoded file to a proper 2x3 .nth file still nothing happens.

It's working if you force the right nth file in the script but keep ifc4 in the palette :

build_ele.IfcExportTheme.value = AllplanSettings.AllplanPaths.GetEtcPath() + r"Favoriten Standard\IFC\Ifc_2x3_Coordination_View_eng.nth"

Best

Přílohy (1)

Type: image/png
Staženo 59
Size: 43,65 KiB

I selected ifc version 4 and used AllplanSettings.AllplanPaths.GetEtcPath() + r"Favorites - standard\IFC\Ifc_2x3_Coordination_View_eng.nth"

but the resulted file still was in ifc4

Did you check your exported file ?
Open the ifc file in a text editor and in the first few line there is a line : FILE_SCHEMA(('IFC4'));

So even that I forced the 2x3.nth file it still saved ifc4.

Thanks in advance

Přílohy (1)

Type: image/png
Staženo 26
Size: 11,71 KiB

IFC2x3 here.

I don't like to force certain parameters in this way, it's a source of errors...

I hope the script will be updated and reposted soon.

Přílohy (1)

Type: image/png
Staženo 35
Size: 44,69 KiB

Tried the same thing as you, still couldn't save 2x3. I'm trying to reinstall allplan now, maybe that can solve the difference

After reinstallation the problem still persists
( in older versions of AllPlan with the drawingservice I could save ifc2x3 by changing the version to ifc 4 and selected a 2x3 translator but not with the new ExportImportService )

Anyone have any other suggestions ?

I even tried all the versions with a for loop, but only ifc4 versions were saved check attached images.:

Přílohy (2)

Type: image/png
Staženo 50
Size: 23,45 KiB
Type: image/png
Staženo 19
Size: 7,42 KiB
1 - 10 (13)