Macro Remove parametric history/it: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 13: Line 13:
==Script==
==Script==
'''Remove parametric history.FCMacro'''
'''Remove parametric history.FCMacro'''
{{Code|code=
<syntaxhighlight>


originalObject = FreeCAD.ActiveDocument.ActiveObject
originalObject = FreeCAD.ActiveDocument.ActiveObject
Line 22: Line 22:
newObject.Shape = newShape
newObject.Shape = newShape


}}
</syntaxhighlight>
{{clear}}
{{clear}}
<languages/>
<languages/>

Revision as of 11:04, 23 September 2016

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

Descrizione

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


Prima e dopo :


Script

Remove parametric history.FCMacro

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