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)
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
{{Macro|Icon=Text-x-python|Name=Remove parametric history|Description=This will remove all parametric associativity from an object, leaving it as a "dumb" shape|Author=Yorik}}
{{Macro/it
|Name=Remove parametric history
|Icon=Macro_Remove_parametric_history.png
|Translate=Rimozione della cronologia
|Description=Questa operazione rimuove tutte le associazioni parametriche da un oggetto, lasciandolo come ''muto''
|Author=Yorik
|Version=0.1
|Date=2011-08-01
|FCVersion=All
|Download=[https://www.freecadweb.org/wiki/images/b/b7/Macro_Remove_parametric_history.png ToolBar Icon]
}}


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


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


Prima e dopo :
<syntaxhighlight>
newShape = originalObject.Shape.copy()
newName = FreeCAD.ActiveDocument.ActiveObject.Name
FreeCAD.ActiveDocument.removeObject(newName)
newObject = FreeCAD.ActiveDocument.addObject("Part::Feature",newName)
newObject.Shape = newShape


[[File:RPH_before.png]]
</syntaxhighlight>

[[File:RPH_after.png]]

==Script==

ToolBar Icon [[Image:Macro_Remove_parametric_history.png]]

'''Remove parametric history.FCMacro'''

{{MacroCode|code=

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

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

Latest revision as of 11:13, 23 May 2020

Rimozione della cronologia

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

Versione macro: 0.1
Ultima modifica: 2011-08-01
Versione FreeCAD: All
Download: ToolBar Icon
Autore: Yorik
Autore
Yorik
Download
ToolBar Icon
Link
Versione macro
0.1
Data ultima modifica
2011-08-01
Versioni di FreeCAD
All
Scorciatoia
Nessuna
Vedere anche
Nessuno

Descrizione

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

Prima e dopo :

Script

ToolBar Icon

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