TransWikia.com

FreeCAD - Scale object from command line

Engineering Asked on December 30, 2020

I want to be able to scale an object from the command line. Using the GUI i go and load the STEP file, and select "Draft Workbench". This is the code generated so far (that i am able to see in the console):

import ImportGui
ImportGui.open(u"/home/user1/Desktop/STEP_files/TestFile.step")
App.setActiveDocument("Unnamed")
App.ActiveDocument=App.getDocument("Unnamed")
Gui.ActiveDocument=Gui.getDocument("Unnamed")
Gui.SendMsgToActiveView("ViewFit")
Gui.activateWorkbench("DraftWorkbench")

Then i select the scaling tool from the GUI and scale the x,y,z factor of the original object and i am thus able to scale it in the according axis.

However, no new code is generated when i perform these actions.
So how am i able to scale an object without the GUI, just from a python program alone?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP