Macro Remove parametric history/it: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 4: Line 4:




Before and after:


[[File:RPH_before.png|left]] [[File:RPH_after.png]]
{{clear}}
==Script==
'''Remove parametric history.FCMacro'''
<syntaxhighlight>
<syntaxhighlight>



Revision as of 12:14, 10 May 2014

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

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


Before and after:


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