FreeCAD-Doc/localwiki/Macro_Remove_parametric_history-cs.html
2018-07-19 18:47:02 -05:00

85 lines
3.9 KiB
HTML

<html><head><title>Macro Remove parametric history/cs</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Macro Remove parametric history/cs</h1></div>
<div id="mw-content-text" lang="cs" dir="ltr" class="mw-content-ltr"><hr/><div class="mw-parser-output"><table class="fcinfobox wikitable ct" width="100%" style="float: right; width: 230px; margin-left: 10px;">
<tr>
<td class="ctTitle">
<h3><span class="mw-headline" id="Remove_parametric_history"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Text-x-python.png" class="image"><img alt="Text-x-python.png" src="32px-Text-x-python.png" width="32" height="32" srcset="/wiki/images/2/2c/Text-x-python.png 1.5x" /></a> Remove parametric history</span></h3>
</td></tr>
<tr>
<th class="ctOdd">Description
</th></tr>
<tr>
<td class="ctEven left macro-description">Odebere všechny parametrické asociace z objektu ponechajíc ho jako osamocené těleso
</td></tr>
<tr>
<th class="ctOdd">Author
</th></tr>
<tr>
<td class="ctEven macro-author"><a href="https://www.freecadweb.org/wiki/index.php?title=User:Yorik" title="User:Yorik">Yorik</a>
</td></tr>
<tr>
<th class="ctOdd">Links
</th></tr>
<tr>
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Macros_recipes/cs" title="Macros recipes/cs">Makro návody</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=How_to_install_macros/cs" title="How to install macros/cs">How to install macros</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=Customize_Toolbars/cs" title="Customize Toolbars/cs">How to customize toolbars</a>
</td></tr>
<tr>
<th class="ctOdd">Version
</th></tr>
<tr>
<td class="ctEven macro-version">0.1
</td></tr>
<tr>
<th class="ctOdd">Date last modification
</th></tr>
<tr>
<td class="ctEven macro-date">2011-08-01
</td></tr>
<tr>
<th class="ctOdd">
</th></tr>
<tr>
<td class="ctToc"><br /><div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="#Remove_parametric_history"><span class="tocnumber">1</span> <span class="toctext">Remove parametric history</span></a></li>
<li class="toclevel-1 tocsection-1"><a href="#Popis"><span class="tocnumber">2</span> <span class="toctext">Popis</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Script"><span class="tocnumber">3</span> <span class="toctext">Script</span></a></li>
</ul>
</div>
</td></tr>
</table>
<p><br />
</p>
<h2><span class="mw-headline" id="Popis">Popis</span></h2>
<p>Odebere všechny parametrické asociace z objektu ponechajíc ho jako osamocené těleso
</p><p><br />
Před a po:
</p><p><br />
</p>
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:RPH_before.png" class="image"><img alt="RPH before.png" src="RPH_before.png" width="263" height="190" /></a></div> <a href="https://www.freecadweb.org/wiki/index.php?title=File:RPH_after.png" class="image"><img alt="RPH after.png" src="RPH_after.png" width="263" height="186" /></a> <div style="clear:both"></div>
<h2><span class="mw-headline" id="Script">Script</span></h2>
<p><b>Remove parametric history.FCMacro</b>
</p>
<pre>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 </pre>
<div style="clear:both"></div>
</div>
</div>
</div><div class="printfooter">
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Macro_Remove_parametric_history/cs&amp;oldid=240819">http://www.freecadweb.org/wiki/index.php?title=Macro_Remove_parametric_history/cs&amp;oldid=240819</a>"</div>
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
</div>
</div>
<div id="mw-navigation">
<h2>Navigation menu</h2>
</body></html>