I am developing a fully parametrized geometry creation script which shall run in the command line. I am struggling to assign materials to an Arch.Wall object. All the python-console tells me when performing this step in the UI is
Code: Select all
>>> ### Begin command Arch_MaterialTools
>>> mat = Arch.makeMaterial()
>>> FreeCAD.ActiveDocument.getObject("Wall").Material = mat
>>> mat.ViewObject.Document.setEdit(mat.ViewObject, 0)
>>> ### End command Arch_MaterialTools
P.S.: Also I am not liking the idea of having to "copy" material properties from the database for each model instead of just using the database entry. It seems I have to create a new material called concrete, which copies the concrete in the database. But this is more of a feature request / my opinion than a real problem.
Thanks in advance!
-----
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27422 (Git)
Build type: Release
Branch: master
Hash: d938733eaf2c2ce7cb18d1cbb56147185c473530
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: German/Germany (de_DE)