Macro Rimozione della cronologia

From FreeCAD Documentation
Revision as of 20:18, 1 January 2014 by Renatorivo (talk | contribs) (Created page with "{{Macro/it|Icon=Text-x-python|Name=Remove parametric history|Name/it=Remove parametric history|Description=Questa operazione rimuove tutte le associazioni parametriche da un o...")

File:Text-x-python Remove parametric history

Descrizione
Questa operazione rimuove tutte le associazioni parametriche da un oggetto, lasciandolo come muto

Autore: Yorik
Autore
Yorik
Download
None
Link
Versione macro
1.0
Data ultima modifica
None
Versioni di FreeCAD
None
Scorciatoia
Nessuna
Vedere anche
Nessuno

This will remove all parametric associativity from an object, leaving it as a "dumb" shape


 newShape = originalObject.Shape.copy()
 newName = FreeCAD.ActiveDocument.ActiveObject.Name
 FreeCAD.ActiveDocument.removeObject(newName)
 newObject = FreeCAD.ActiveDocument.addObject("Part::Feature",newName)
 newObject.Shape = newShape