<?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 : Automatické přejmenování těles</title>
  <link>https://www.cadforum.cz/forum/</link>
  <description><![CDATA[Toto je XML obsahový kanál serveru; CAD F&#243;rum : iLogic a ETO : Automatické přejmenování těles]]></description>
  <pubDate>Sun, 05 Apr 2026 15:32:05 +0000</pubDate>
  <lastBuildDate>Sun, 02 Jan 2022 15: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=32751</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[Automatické přejmenování těles : Moc hezk&#253;Tady jsem jenom ud&#283;lal...]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=32751&amp;PID=125226&amp;title=automaticke-prejmenovani-teles#125226</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> 32751<br /><strong>Zasláno:</strong> 02.led.2022 v 15:49<br /><br />Moc hezký&nbsp;<img src="https://www.cadforum.cz/forum/smileys/smiley32.gif" border="0" alt="Clap" title="Clap" /><div>Tady jsem jenom udělal pár kosmetických změn</div><div><ul><li>Přesunul jsem kontrolu typu dokumentu na začátek</li><li>Odstranil jsem vícenásobné získávání aktivního dokumentu</li><li>Sjednotil jsem použití iVlastnosti pro prefix do jedné proměnné</li><li>Rozdělil jsem použití proměnné prefix pro název iVlastnosti a její hodnotu</li><li>Zjednodušil jsem formátování finálního názvu tělesa</li></ul></div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>'------- start of ilogic ------</div><div>'check that this active document is a part file&nbsp; &nbsp;</div><div>Dim partDoc As PartDocument</div><div>If ThisApplication.ActiveDocument.DocumentType &lt;&gt; DocumentTypeEnum.kPartDocumentObject Then</div><div>&nbsp; &nbsp; MessageBox.Show("Please open a part document", "iLogic")</div><div>&nbsp; &nbsp; Return</div><div>End If</div><div><br></div><div>'define the active document</div><div>partDoc = ThisApplication.ActiveDocument</div><div><br></div><div>'check for custom iProperty and add it if not found</div><div>Dim prefixPropertyName As String = "Prefix"</div><div>Dim customPropertySet = partDoc.PropertySets.Item("Inventor User Defined Properties")</div><div><br></div><div>Dim prefixProperty As Inventor.Property</div><div>Try</div><div>&nbsp; &nbsp; prefixProperty = customPropertySet.Item(prefixPropertyName)</div><div>Catch</div><div>&nbsp; &nbsp; ' Assume error means not found</div><div>&nbsp; &nbsp; prefixProperty = customPropertySet.Add("", prefixPropertyName)</div><div>End Try</div><div><br></div><div>'write the part number to the Prefix iProperty if it is empty</div><div>If String.IsNullOrEmpty(prefixProperty.Value.ToString()) Then</div><div>&nbsp; &nbsp; prefixProperty.Value = iProperties.Value("Project", "Part Number") &amp; "_"</div><div>End If</div><div><br></div><div>'get input from user</div><div>Dim bodyPrefix = InputBox("Enter a prefix for the solid body names", "iLogic", prefixProperty.Value.ToString())</div><div><br></div><div>'write input back to custom iProperty</div><div>prefixProperty.Value = bodyPrefix</div><div><br></div><div>'rename all solid bodies incrementing suffix</div><div>Dim i As Integer = 1</div><div>For Each solid As SurfaceBody In partDoc.ComponentDefinition.SurfaceBodies</div><div>&nbsp; &nbsp; solid.Name = String.Format("{0}{1:00}", bodyPrefix, i)</div><div>&nbsp; &nbsp; i += 1</div><div>Next</div><div>'------- End Of ilogic ------</div></div><div></pre></td></tr></table></div><div><br></div>]]>
   </description>
   <pubDate>Sun, 02 Jan 2022 15:49:35 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=32751&amp;PID=125226&amp;title=automaticke-prejmenovani-teles#125226</guid>
  </item> 
  <item>
   <title><![CDATA[Automatické přejmenování těles : D&#237;k, to by mohlo b&#253;t u&#382;ite&#269;n&#233;....]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=32751&amp;PID=125225&amp;title=automaticke-prejmenovani-teles#125225</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=12816">Boleslav</a><br /><strong>Předmět:</strong> 32751<br /><strong>Zasláno:</strong> 02.led.2022 v 15:20<br /><br /><div>Dík, to by mohlo být užitečné.</div><div><br></div>]]>
   </description>
   <pubDate>Sun, 02 Jan 2022 15:20:31 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=32751&amp;PID=125225&amp;title=automaticke-prejmenovani-teles#125225</guid>
  </item> 
  <item>
   <title><![CDATA[Automatické přejmenování těles : Ahoj v&#353;em,R&#225;d pou&#382;&#237;v&#225;m v&#237;ceobjemov&#225;...]]></title>
   <link>https://www.cadforum.cz/forum/forum_posts.asp?TID=32751&amp;PID=125224&amp;title=automaticke-prejmenovani-teles#125224</link>
   <description>
    <![CDATA[<strong>Autor:</strong> <a href="https://www.cadforum.cz/forum/member_profile.asp?PF=1782">madep</a><br /><strong>Předmět:</strong> 32751<br /><strong>Zasláno:</strong> 02.led.2022 v 14:25<br /><br />Ahoj všem,<br />Rád používám víceobjemová tělesa jako řídící modely pro sestavy. Abych si ušetřil práci s pojmenováváním souborů při exportu do sestavy, nejdříve si všechna tělesa očísluju. Ruční přepisování je trochu nepohodlné. Podařilo se mi najít výborné pravidlo. Takže všem, kdo takto pracujete je k dispozici níže.<br /><br />Martin Depta<br />Eltodo a.s.<br /><br />'------- start of ilogic ------<br />'check for custom iProperty and add it if not found<br />Dim prefix As String = "Prefix"<br />customPropertySet = ThisDoc.Document.PropertySets.Item _<br />("Inventor User Defined Properties")<br /><br />Try<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  prop= customPropertySet.Item(prefix)<br />Catch<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' Assume error means not found<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customPropertySet.Add("", prefix)<br />End Try<br /><br />'write the part number to the Prefix iProperty if it is empty<br />If iProperties.Value("Custom", "Prefix") = "" Then<br />iProperties.Value("Custom", "Prefix") = iProperties.Value("Project", "Part Number") & "_"<br />Else<br />End If<br /><br />'check that this active document is a part file&nbsp;&nbsp;&nbsp;<br />Dim partDoc As PartDocument<br />If ThisApplication.ActiveDocument.DocumentType &lt;&gt; kPartDocumentObject Then<br />MessageBox.Show ("Please open a part document", "iLogic")<br />End If<br /><br />'define the active document<br />partDoc = ThisApplication.ActiveDocument<br />Dim solid As SurfaceBody<br />Dim i As Integer<br /><br />'get input from user<br />prefix = InputBox("Enter a prefix for the solid body names", "iLogic", iProperties.Value("Custom", "Prefix"))<br /><br />'write input back to custom iProperty<br />iProperties.Value("Custom", "Prefix") = prefix<br />i = 1<br />'rename all solid bodies incrementing suffix<br />For Each solid In partDoc.ComponentDefinition.SurfaceBodies<br />solid.Name = prefix + IIf(i &lt; 10, "0" + CStr(i), CStr(i))<br />i = i + 1<br />Next<br />'------- End Of ilogic ------<br />]]>
   </description>
   <pubDate>Sun, 02 Jan 2022 14:25:22 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum/forum_posts.asp?TID=32751&amp;PID=125224&amp;title=automaticke-prejmenovani-teles#125224</guid>
  </item> 
 </channel>
</rss>