A2Plus scripting without GUI

Need help, or want to share a macro? Post here!
Post Reply
leoheck
Posts: 161
Joined: Tue Mar 13, 2018 5:56 pm

A2Plus scripting without GUI

Post by leoheck » Fri Jan 17, 2020 5:19 pm

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests