<?xml version="1.0" encoding="windows-1250" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>CAD F&#243;rum : Měření smyčky v náčrtu</title>
  <link>https://www.cadforum.cz/forum/</link>
  <description><![CDATA[Toto je XML obsahový kanál serveru; CAD F&#243;rum : iLogic a ETO : Měření smyčky v náčrtu]]></description>
  <pubDate>Thu, 07 May 2026 10:31:34 +0000</pubDate>
  <lastBuildDate>Thu, 20 Feb 2014 10:49:35 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.cadforum.cz/forum/RSS_post_feed.asp?TID=18766</WebWizForums:feedURL>
  <image>
   <title><![CDATA[CAD F&#243;rum]]></title>
   <url>https://www.cadforum.cz/forum/forum_images/web_wiz_forums.png</url>
   <link>https://www.cadforum.cz/forum/</link>
  </image>
  <item>
   <title><![CDATA[Měření smyčky v náčrtu : D&#283;kuji, mrknu na to a vyzkou&#353;&#237;m....]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=18766&amp;PID=84295&amp;title=mereni-smycky-v-nacrtu#84295</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=23029">kosulic</a><br /><strong>Předmět:</strong> 18766<br /><strong>Zasláno:</strong> 20.úno.2014 v 10:49<br /><br />Děkuji, mrknu na to a vyzkouším.]]>
   </description>
   <pubDate>Thu, 20 Feb 2014 10:49:35 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=18766&amp;PID=84295&amp;title=mereni-smycky-v-nacrtu#84295</guid>
  </item> 
  <item>
   <title><![CDATA[Měření smyčky v náčrtu :   V tom k&#243;du je n&#283;kolik form&#225;ln&#237;ch...]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=18766&amp;PID=84250&amp;title=mereni-smycky-v-nacrtu#84250</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=9996">Navara</a><br /><strong>Předmět:</strong> 18766<br /><strong>Zasláno:</strong> 18.úno.2014 v 20:00<br /><br />V tom kódu je několik formálních chyb a měl by vypadat takhle:<div><table width="99%"><tr><td><pre class="BBcode"></div><div>Dim Param As Parameter<br>Try<br>&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters("DELKA_SMYCKY")<br>Catch<br>&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.AddByExpression("DELKA_SMYCKY", 1, "mm")<br>End Try</div><div>Dim se As SketchEntity = ThisDoc.Document.ComponentDefinition.Sketches(1).SketchLines(1)<br>Dim delkaRetezu As Double = Math.Round(ThisApplication.MeasureTools.GetLoopLength(se)) * 10<br>Param.Expression = (delkaRetezu &amp; " mm")</div><div>Try<br>&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters("ROZTEC_RETEZU")<br>Catch<br>&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.AddByExpression("ROZTEC_RETEZU", 1, "mm")<br>End Try<br>Dim roztecRetezu As Double = 12.7<br>Param.Expression = roztecRetezu &amp; "mm"</div><div>Try<br>&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters("POCET_CLANKU")<br>Catch<br>&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.AddByExpression("POCET_CLANKU", 1, "ul")<br>End Try<br>Dim pocetClanku As Integer = Math.Round(delkaRetezu / roztecRetezu)<br>Param.Expression = pocetClanku &amp; "ul"</div><div>Try<br>&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters("SPOJKA_POCET")<br>Catch<br>&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.AddByExpression("SPOJKA_POCET", 1, "ul")<br>End Try<br>Param.Expression = Math.Floor((delkaRetezu / 5000)) + 1 &amp; "ul"</div><div></pre></td></tr></table></div><div>&nbsp;</div><div>ale asi bych dal přednost zkrácené verzi s voláním funkce pro nastavení parametru a jeho p5enosem do iVlastnosti</div><div>&nbsp;</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>Sub Main()<br>&nbsp;&nbsp;&nbsp; Dim se As SketchEntity = ThisDoc.Document.ComponentDefinition.Sketches(1).SketchLines(1)</div><div>&nbsp;&nbsp;&nbsp; Dim delkaRetezu As Double = Math.Round(ThisApplication.MeasureTools.GetLoopLength(se)) * 10<br>&nbsp;&nbsp;&nbsp; SetParam("DELKA_SMYCKY", delkaRetezu, " mm")</div><div>&nbsp;&nbsp;&nbsp; Dim roztecRetezu As Double = 12.7<br>&nbsp;&nbsp;&nbsp; SetParam("ROZTEC_RETEZU", roztecRetezu, "mm")</div><div>&nbsp;&nbsp;&nbsp; Dim pocetClanku As Integer = Math.Round(delkaRetezu / roztecRetezu)<br>&nbsp;&nbsp;&nbsp; SetParam("POCET_CLANKU", pocetClanku, "ul")</div><div>&nbsp;&nbsp;&nbsp; SetParam("SPOJKA_POCET", Math.Floor((delkaRetezu / 5000)) + 1, "ul")<br>End Sub</div><div>Sub SetParam(paramName As String, value As Double, units As String)<br>&nbsp;&nbsp;&nbsp; Dim Param As Parameter<br>&nbsp;&nbsp;&nbsp; Try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters(paramName)<br>&nbsp;&nbsp;&nbsp; Catch<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Param = ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.AddByExpression(paramName, 1, units)<br>&nbsp;&nbsp;&nbsp; End Try<br>&nbsp;&nbsp;&nbsp; Param.Expression = String.Format("{0} {1}", value, units)</div><div>&nbsp;&nbsp;&nbsp; 'Set as property<br>&nbsp;&nbsp;&nbsp; Param.ExposedAsProperty = True<br>&nbsp;&nbsp;&nbsp; Param.CustomPropertyFormat.Precision = CustomPropertyPrecisionEnum.kOneDecimalPlacePrecision<br>&nbsp;&nbsp;&nbsp; Param.CustomPropertyFormat.PropertyType = CustomPropertyTypeEnum.kTextPropertyType<br>&nbsp;&nbsp;&nbsp; Param.CustomPropertyFormat.ShowTrailingZeros = False<br>&nbsp;&nbsp;&nbsp; Param.CustomPropertyFormat.ShowUnitsString = False<br>&nbsp;&nbsp;&nbsp; '...</div><div>End Sub</div><div></pre></td></tr></table></div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Tue, 18 Feb 2014 20:00:31 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=18766&amp;PID=84250&amp;title=mereni-smycky-v-nacrtu#84250</guid>
  </item> 
  <item>
   <title><![CDATA[Měření smyčky v náčrtu : Zkou&#353;&#237;m ud&#283;lat pravidlo na m&#283;&#345;en&#237;...]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=18766&amp;PID=84203&amp;title=mereni-smycky-v-nacrtu#84203</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=23029">kosulic</a><br /><strong>Předmět:</strong> 18766<br /><strong>Zasláno:</strong> 18.úno.2014 v 09:33<br /><br /><div>Zkouším udělat pravidlo na měření smyčky z náčrtu (model řetězu)</div><div>Potřebuji vytvořit 4 parametry (nejlépe je označit pro export)</div><div>Změřit smyčku</div><div>vypočítat počet článků</div><div>vypočítat počet spojek</div><div><br></div><div>Nefunguje mi ale zaokrouhlování a nevím jak parametry označit pro export.</div><div>Kdyby se našla dobrá duše, která by mi pomohla, byl bych vděčný.</div><div><br></div><div><br></div><span style="color: rgb255, 0, 0; font-weight: bold; ">Try</span><pre>    <span style="color: #800000;">Param</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Parameters</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">DELKA_SMYCKY</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">Catch</span>    <span style="color: #800000;">Param</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Parameters</span>.<span style="color: #800000;">UserParameters</span>.<span style="color: #800000;">AddByExpression</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">DELKA_SMYCKY</span><span style="color: #008080;">"</span>, <span style="font-weight: bold; ">1</span>, <span style="color: #008080;">"</span><span style="color: #008080;">mm</span><span style="color: #008080;">"</span> <span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">End</span> <span style="color: #FF0000; font-weight: bold;">Try</span><span style="color: #FF0000; font-weight: bold;">Dim</span> <span style="color: #800000;">se</span> <span style="color: #FF0000; font-weight: bold;">As</span> <span style="color: #800000;">SketchEntity</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Sketches</span><span style="font-weight: bold; ">(</span><span style="font-weight: bold; ">1</span><span style="font-weight: bold; ">)</span>.<span style="color: #800000;">SketchLines</span><span style="font-weight: bold; ">(</span><span style="font-weight: bold; ">1</span><span style="font-weight: bold; ">)</span>  <span style="color: #800000;">Param</span>.<span style="color: #800000;">Expression</span> <span style="font-weight: bold; ">=</span><span style="font-weight: bold; ">(</span><span style="color: #800080; font-weight: bold;">ThisApplication</span>.<span style="color: #800000;">MeasureTools</span>.<span style="color: #800000;">GetLoopLength</span><span style="font-weight: bold; ">(</span><span style="color: #800000;">se</span><span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">*</span><span style="font-weight: bold; ">10</span> <span style="color: #FF0000; font-weight: bold;">&amp;</span> <span style="color: #008080;">"</span><span style="color: #008080;"> mm</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span><span style="color: #800080; font-weight: bold;">Parameter</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">DELKA_SMYCKY</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">Round</span><span style="font-weight: bold; ">(</span><span style="color: #800000;">DELKA_SMYCKY</span><span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">Try</span>    <span style="color: #800000;">Param</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Parameters</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">ROZTEC_RETEZU</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">Catch</span>    <span style="color: #800000;">Param</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Parameters</span>.<span style="color: #800000;">UserParameters</span>.<span style="color: #800000;">AddByExpression</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">ROZTEC_RETEZU</span><span style="color: #008080;">"</span>, <span style="font-weight: bold; ">1</span>, <span style="color: #008080;">"</span><span style="color: #008080;">mm</span><span style="color: #008080;">"</span> <span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">End</span> <span style="color: #FF0000; font-weight: bold;">Try</span><span style="color: #800080; font-weight: bold;">Parameter</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">ROZTEC_RETEZU</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span> <span style="font-weight: bold; ">=</span> <span style="font-weight: bold; ">12.7</span><span style="color: #FF0000; font-weight: bold;">Try</span>    <span style="color: #800000;">Param</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Parameters</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">POCET_CLANKU</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">Catch</span>    <span style="color: #800000;">Param</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Parameters</span>.<span style="color: #800000;">UserParameters</span>.<span style="color: #800000;">AddByExpression</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">POCET_CLANKU</span><span style="color: #008080;">"</span>, <span style="font-weight: bold; ">1</span>, <span style="color: #008080;">"</span><span style="color: #008080;">ul</span><span style="color: #008080;">"</span> <span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">End</span> <span style="color: #FF0000; font-weight: bold;">Try</span><span style="color: #800080; font-weight: bold;">Parameter</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">POCET_CLANKU</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">Round</span><span style="font-weight: bold; ">(</span><span style="color: #800000;">DELKA_SMYCKY</span><span style="color: #FF0000; font-weight: bold;">/</span><span style="color: #800000;">ROZTEC_RETEZU</span><span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">Try</span>    <span style="color: #800000;">Param</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Parameters</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">SPOJKA_POCET</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">Catch</span>    <span style="color: #800000;">Param</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">ThisDoc</span>.<span style="color: #800080; font-weight: bold;">Document</span>.<span style="color: #800000;">ComponentDefinition</span>.<span style="color: #800000;">Parameters</span>.<span style="color: #800000;">UserParameters</span>.<span style="color: #800000;">AddByExpression</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">SPOJKA_POCET</span><span style="color: #008080;">"</span>, <span style="font-weight: bold; ">1</span>, <span style="color: #008080;">"</span><span style="color: #008080;">ul</span><span style="color: #008080;">"</span> <span style="font-weight: bold; ">)</span><span style="color: #FF0000; font-weight: bold;">End</span> <span style="color: #FF0000; font-weight: bold;">Try</span><span style="color: #800080; font-weight: bold;">Parameter</span><span style="font-weight: bold; ">(</span><span style="color: #008080;">"</span><span style="color: #008080;">SPOJKA_POCET</span><span style="color: #008080;">"</span><span style="font-weight: bold; ">)</span> <span style="font-weight: bold; ">=</span> <span style="color: #800080; font-weight: bold;">Floor</span><span style="font-weight: bold; ">((</span><span style="color: #800000;">DELKA_SMYCKY</span><span style="color: #FF0000; font-weight: bold;">/</span><span style="font-weight: bold; ">5000</span><span style="font-weight: bold; ">))</span><span style="color: #FF0000; font-weight: bold;">+</span><span style="font-weight: bold; ">1</span></pre>]]>
   </description>
   <pubDate>Tue, 18 Feb 2014 09:33:50 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=18766&amp;PID=84203&amp;title=mereni-smycky-v-nacrtu#84203</guid>
  </item> 
 </channel>
</rss>