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

85 lines
4.0 KiB
HTML

<html><head><title>Macro ForceRecompute/it</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 ForceRecompute/it</h1></div>
<div id="mw-content-text" lang="it" 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="Macro_Force_Recompute"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Force_Recompute.png" class="image"><img alt="Force Recompute.png" src="32px-Force_Recompute.png" width="32" height="32" srcset="/wiki/images/8/88/Force_Recompute.png 1.5x" /></a> Macro Force Recompute</span></h3>
</td></tr>
<tr>
<th class="ctOdd">Descrizione
</th></tr>
<tr>
<td class="ctEven left">Forza il ricalcolo manuale del modello
</td></tr>
<tr>
<th class="ctOdd">Autore
</th></tr>
<tr>
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=User:Shoogen&amp;action=edit&amp;redlink=1" class="new" title="User:Shoogen (page does not exist)">shoogen</a>
</td></tr>
<tr>
<th class="ctOdd">Link
</th></tr>
<tr>
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Macros_recipes/it" title="Macros recipes/it">Esempi di macro</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=How_to_install_macros/it" title="How to install macros/it">Come installare le Macro</a><br /><a href="https://www.freecadweb.org/wiki/index.php?title=Customize_Toolbars/it" title="Customize Toolbars/it">Personalizzare la barra degli strumenti</a>
</td></tr>
<tr>
<th class="ctOdd">Versione
</th></tr>
<tr>
<td class="ctEven macro-version">1.0
</td></tr>
<tr>
<th class="ctOdd">Data ultima modifica
</th></tr>
<tr>
<td class="ctEven macro-date">2014-09-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="#Macro_Force_Recompute"><span class="tocnumber">1</span> <span class="toctext">Macro Force Recompute</span></a></li>
<li class="toclevel-1 tocsection-1"><a href="#Uso"><span class="tocnumber">2</span> <span class="toctext">Uso</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><p>A volte in FreeCAD l'utente applica delle modifiche al modello, ma FreeCAD sembra non riconoscerle e l'icona blu <a href="https://www.freecadweb.org/wiki/index.php?title=File:View-refresh.svg" class="image"><img alt="View-refresh.svg" src="View-refresh.svg" width="16" height="16" /></a> rimane grigia. Questa piccola macro impone un ricalcolo manuale del modello.
</p><p>Da FreeCAD v0.17, l'azione di questa macro può essere ottenuta tramite GUI. Nella vista a albero del modello, fare clic destro sul progetto e scegliere "Marca da ricalcolare" dal menu contestuale. Dopo di che, premere il pulsante <a href="https://www.freecadweb.org/wiki/index.php?title=Std_Refresh/it" title="Std Refresh/it">Ricalcola</a>.
</p>
<h3><span class="mw-headline" id="Uso">Uso</span></h3>
<p>Avviare la macro quando serve.
</p>
<h3><span class="mw-headline" id="Script">Script</span></h3>
<p>Macro Force_Recompute.py
</p>
<pre># -*- coding: utf-8 -*-
# Force Recompute
# macro provided by shoogen
import FreeCAD
for obj in FreeCAD.ActiveDocument.Objects:
obj.touch()
FreeCAD.ActiveDocument.recompute() </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_ForceRecompute/it&amp;oldid=240973">http://www.freecadweb.org/wiki/index.php?title=Macro_ForceRecompute/it&amp;oldid=240973</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>