# -*- coding: utf-8 -*- # Macro Begin: /home/jruiz/.FreeCAD/Macro/plant.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++ import FreeCAD import Spreadsheet import DynamicDataCmd import newAssemblyCmd import newDatumCmd #import Commands # Gui.runCommand('Std_DlgMacroRecord',0) ### Begin command Std_New App.newDocument("Unnamed") # App.setActiveDocument("Sin_nombre") # App.ActiveDocument=App.getDocument("Sin_nombre") # Gui.ActiveDocument=Gui.getDocument("Sin_nombre") # Gui.activeDocument().activeView().viewDefaultOrientation() ### End command Std_New ### Begin command Std_TextDocument App.ActiveDocument.addObject("App::TextDocument","Text document").Label="Text document" # Gui.ActiveDocument.ActiveObject.doubleClicked() App.ActiveDocument.recompute() ### End command Std_TextDocument # Gui.Selection.addSelection('Sin_nombre','Text_document') #FreeCAD.getDocument('Sin_nombre').getObject('Text_document').Label = "L" #FreeCAD.getDocument('Sin_nombre').getObject('Text_document').Label = "Le" #FreeCAD.getDocument('Sin_nombre').getObject('Text_document').Label = "Lee" #FreeCAD.getDocument('Sin_nombre').getObject('Text_document').Label = "LeeM" FreeCAD.getDocument('Unnamed').getObject('Text_document').Label = "ReadMe" ### Begin command Std_Group App.activeDocument().Tip = App.activeDocument().addObject('App::DocumentObjectGroup','Group') App.activeDocument().Group.Label = 'Group' ### End command Std_Group # Gui.Selection.clearSelection() # Gui.Selection.addSelection('Sin_nombre','Group') FreeCAD.getDocument('Unnamed').getObject('Group').Label = "InputObjects" ### Begin command Std_Workbench # Gui.activateWorkbench("SpreadsheetWorkbench") ### End command Std_Workbench ### Begin command Spreadsheet_CreateSheet App.activeDocument().addObject('Spreadsheet::Sheet','Spreadsheet') # Gui.Selection.clearSelection() # # Gui.Selection.addSelection(App.activeDocument().Name,'Spreadsheet') ### End command Spreadsheet_CreateSheet # Gui.Selection.addSelection('Sin_nombre','Spreadsheet') FreeCAD.getDocument('Unnamed').getObject('Spreadsheet').Label = "data" ### Begin command Std_Workbench Gui.activateWorkbench("DynamicDataWorkbench") ### End command Std_Workbench Gui.runCommand('DynamicDataCreateObject',0) Gui.Selection.addSelection('Unnamed','dd') ### Begin command Std_Workbench Gui.activateWorkbench("Assembly4Workbench") ### End command Std_Workbench Gui.runCommand('Asm4_makeAssembly',0) ### Begin command Std_Group App.activeDocument().Tip = App.activeDocument().addObject('App::DocumentObjectGroup','Group001') App.activeDocument().Group001.Label = 'Group' ### End command Std_Group # Gui.Selection.addSelection('Sin_nombre','Group001') FreeCAD.getDocument('Unnamed').getObject('Group001').Label = "OutputObjects" ### Begin command Std_SaveAs Gui.SendMsgToActiveView("SaveAs") ### End command Std_SaveAs # Macro End: /home/jruiz/.FreeCAD/Macro/plant.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++