Page 1 of 1

A2Plus scripting without GUI

Posted: Fri Jan 17, 2020 5:19 pm
by leoheck
Hi, I have a simple python script to export mesh files from my models.
I would like to know how to update a2plus objects from there.

From the python console I saw that it uses this:

Code: Select all

Gui.activateWorkbench("A2plusWorkbench")
Gui.runCommand('a2p_updateImportedParts',0)
However, my script runs on a command-line without Gui. so I don't have this Gui object. I am opening the file with:

Code: Select all

FreeCADGui.setupWithoutGUI()
native_file = FreeCAD.open(freecad_file)
How can I use the A2plus features in this environment I have?