<?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 : FUNKCE IF - VÝBĚR Z EXCELU</title>
  <link>https://www.cadforum.cz/forum/</link>
  <description><![CDATA[Toto je XML obsahový kanál serveru; CAD F&#243;rum : iLogic a ETO : FUNKCE IF - VÝBĚR Z EXCELU]]></description>
  <pubDate>Fri, 15 May 2026 01:19:08 +0000</pubDate>
  <lastBuildDate>Wed, 17 Apr 2019 09:41:21 +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=28724</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[FUNKCE IF - VÝBĚR Z EXCELU : Zdrav&#237;m,M&#225;m pravidlo kter&#233; mi...]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=28724&amp;PID=116274&amp;title=funkce-if-vyber-z-excelu#116274</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=4903">Lukáš Záruba</a><br /><strong>Předmět:</strong> 28724<br /><strong>Zasláno:</strong> 17.dub.2019 v 09:41<br /><br /><div>Zdravím,</div><div><br></div><div>Mám pravidlo které mi pomocí funkce if, ElseIf zjistí jaký je použitý materiál a podle toho vybere zkratku materiálu a napíše jí do Ivlastností - Custom "MAT". Pravidlo jen s pár materiály přikládám níže. Je možné toto pravidlo upravit tak aby se podívalo do excelovské tabulky? z důvodu jednodušího přidávání zkratek.</div><div><br></div><div><pre><span style="color: #FF0000; font-weight: bold;">Dim</span> <span style="color: #800000;">oParams</span> <span style="color: #FF0000; font-weight: bold;">As</span> <span style="color: #800000;">Parameters</span><span style="color: #FF0000; font-weight: bold;">Dim</span> <span style="color: #800000;">oPartDoc</span> <span style="color: #FF0000; font-weight: bold;">As</span> <span style="color: #800000;">PartDocument</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: #FF0000; font-weight: bold;">Dim</span> <span style="color: #800000;">oPartCompDef</span> <span style="color: #FF0000; font-weight: bold;">As</span> <span style="color: #800000;">PartComponentDefinition</span> <span style="font-weight: bold;">=</span> <span style="color: #800000;">oPartDoc</span>.<span style="color: #800000;">ComponentDefinition</span><span style="color: #800000;">oParams</span> <span style="font-weight: bold;">=</span> <span style="color: #800000;">oPartCompDef</span>.<span style="color: #800000;">Parameters</span><span style="color: #FF0000; font-weight: bold;">Dim</span> <span style="color: #800000;">oUserParams</span> <span style="color: #FF0000; font-weight: bold;">As</span> <span style="color: #800000;">UserParameters</span> <span style="font-weight: bold;">=</span> <span style="color: #800000;">oParams</span>.<span style="color: #800000;">UserParameters</span><span style="color: #FF0000; font-weight: bold;">Try</span>  <span style="color: #800000;">p</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;">MAT</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;">oUserParams</span>.<span style="color: #800000;">AddByValue</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">MAT</span><span style="color: #008080;">"</span>,<span style="color: #008080;">"</span><span style="color: #008080;">Neni</span><span style="color: #008080;">"</span>, <span style="color: #800000;">UnitsTypeEnum</span>.<span style="color: #800000;">kTextUnits</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;">If</span> <span style="color: #800080; font-weight: bold;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Material</span> <span style="font-weight: bold;">=</span> <span style="color: #008080;">"</span><span style="color: #008080;">Hlin&#65533;k 6061</span><span style="color: #008080;">"</span> <span style="color: #FF0000; font-weight: bold;">Then</span><span style="color: #800080; font-weight: bold;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Value</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">Custom</span><span style="color: #008080;">"</span>, <span style="color: #008080;">"</span><span style="color: #008080;">MAT</span><span style="color: #008080;">"</span><span style="font-weight: bold;">)</span> <span style="font-weight: bold;">=</span> <span style="color: #008080;">"</span><span style="color: #008080;">AL</span><span style="color: #008080;">"</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;">MAT</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;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Value</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">Custom</span><span style="color: #008080;">"</span>, <span style="color: #008080;">"</span><span style="color: #008080;">MAT</span><span style="color: #008080;">"</span><span style="font-weight: bold;">)</span><span style="color: #FF0000; font-weight: bold;">ElseIf</span> <span style="color: #800080; font-weight: bold;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Material</span> <span style="font-weight: bold;">=</span> <span style="color: #008080;">"</span><span style="color: #008080;">Hlin&#65533;k 6061 - PROTISKLUZ</span><span style="color: #008080;">"</span> <span style="color: #FF0000; font-weight: bold;">Then</span><span style="color: #800080; font-weight: bold;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Value</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">Custom</span><span style="color: #008080;">"</span>, <span style="color: #008080;">"</span><span style="color: #008080;">MAT</span><span style="color: #008080;">"</span><span style="font-weight: bold;">)</span> <span style="font-weight: bold;">=</span> <span style="color: #008080;">"</span><span style="color: #008080;">AL-Pr.</span><span style="color: #008080;">"</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;">MAT</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;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Value</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">Custom</span><span style="color: #008080;">"</span>, <span style="color: #008080;">"</span><span style="color: #008080;">MAT</span><span style="color: #008080;">"</span><span style="font-weight: bold;">)</span><span style="color: #FF0000; font-weight: bold;">ElseIf</span> <span style="color: #800080; font-weight: bold;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Material</span> <span style="font-weight: bold;">=</span> <span style="color: #008080;">"</span><span style="color: #008080;">Hlin&#65533;k 6061 - B&#65533;L&#65533; ( RAL 9010 )</span><span style="color: #008080;">"</span> <span style="color: #FF0000; font-weight: bold;">Then</span><span style="color: #800080; font-weight: bold;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Value</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">Custom</span><span style="color: #008080;">"</span>, <span style="color: #008080;">"</span><span style="color: #008080;">MAT</span><span style="color: #008080;">"</span><span style="font-weight: bold;">)</span> <span style="font-weight: bold;">=</span> <span style="color: #008080;">"</span><span style="color: #008080;">AL-(B)</span><span style="color: #008080;">"</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;">MAT</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;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Value</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">Custom</span><span style="color: #008080;">"</span>, <span style="color: #008080;">"</span><span style="color: #008080;">MAT</span><span style="color: #008080;">"</span><span style="font-weight: bold;">)</span><span style="color: #FF0000; font-weight: bold;">ElseIf</span> <span style="color: #800080; font-weight: bold;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Material</span> <span style="font-weight: bold;">=</span> <span style="color: #008080;">"</span><span style="color: #008080;">NEREZ (&#65533;sn 17 240 AISI 304 )</span><span style="color: #008080;">"</span> <span style="color: #FF0000; font-weight: bold;">Then</span><span style="color: #800080; font-weight: bold;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Value</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">Custom</span><span style="color: #008080;">"</span>, <span style="color: #008080;">"</span><span style="color: #008080;">MAT</span><span style="color: #008080;">"</span><span style="font-weight: bold;">)</span> <span style="font-weight: bold;">=</span> <span style="color: #008080;">"</span><span style="color: #008080;">NE</span><span style="color: #008080;">"</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;">MAT</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;">iProperties</span>.<span style="color: #800080; font-weight: bold;">Value</span><span style="font-weight: bold;">(</span><span style="color: #008080;">"</span><span style="color: #008080;">Custom</span><span style="color: #008080;">"</span>, <span style="color: #008080;">"</span><span style="color: #008080;">MAT</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;">If</span><span style="color: #800080; font-weight: bold;">MultiValue</span>.<span style="color: #800080; font-weight: bold;">UpdateAfterChange</span> <span style="font-weight: bold;">=</span> True<span style="color: #808080; font-style: italic;">'</span><span style="color: #808080; font-style: italic;">MessageBox.Show(Parameter("MAT"), "Kontrola Materi&#65533;lu", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1)</span><span style="color: #808080; font-style: italic;"></span></pre></div><div><br></div><div><br></div><div>Myslím tím že bych měl materiál ve sloupci A a zkratku ve sloupci B:</div><div><br></div><div>A&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;B</div><div><br></div><div>Hliník 6061<span style="white-space:pre">		</span>AL</div><div>NEREZ<span style="white-space:pre">			</span>NE</div><div>....</div><div><span style="white-space:pre">					</span></div>]]>
   </description>
   <pubDate>Wed, 17 Apr 2019 09:41:21 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=28724&amp;PID=116274&amp;title=funkce-if-vyber-z-excelu#116274</guid>
  </item> 
 </channel>
</rss>