Macro Remove parametric history

From FreeCAD Documentation
Revision as of 22:06, 3 December 2018 by Vocx (talk | contribs) (Vertical {{Macro}}; fixed icon)

Generic macro icon. Create your personal icon with the same name of the macro Remove parametric history

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

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

Description

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

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