Macro Remove parametric history/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "Před a po:")
(Updating to match new version of source page)
Line 1: Line 1:
{{Macro/cs|Icon=Text-x-python|Name=Remove parametric history|Name/cs=Remove parametric history|Description=Odebere všechny parametrické asociace z objektu ponechajíc ho jako osamocené těleso|Author=Yorik}}
{{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|Version=1.0}}


==Popis==
==Popis==
Line 11: Line 11:
==Script==
==Script==
'''Remove parametric history.FCMacro'''
'''Remove parametric history.FCMacro'''
{{Code|code=
<syntaxhighlight>


originalObject = FreeCAD.ActiveDocument.ActiveObject
originalObject = FreeCAD.ActiveDocument.ActiveObject
Line 20: Line 20:
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

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

Macro version: 1.0
Author: Yorik
Author
Yorik
Download
None
Links
Macro Version
1.0
Date last modified
None
FreeCAD Version(s)
None
Default shortcut
None
See also
None

Popis

Odebere všechny parametrické asociace z objektu ponechajíc ho jako osamocené těleso


Před a po:


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
Other languages: