<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iLogic - Naming solid bodies with dropdown list as a standard name in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8447025#M234001</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A id="link_23" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2511355" target="_self"&gt;MechMachineMan&lt;/A&gt;!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Looks like I had the "end if" in the wrong place.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Only thing is, that code still numbers the parts based on the sequence in the browser, i.e. if the first body in my browser is a reference body (not marked for export) then the first part in exported assembly will be Prefix-02.&amp;nbsp; Maybe it's too&amp;nbsp;complicated, but is there a way to have the rule only change the names of bodies to be exported &lt;EM&gt;and&lt;/EM&gt; number only those bodies in sequence?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;I suppose this was a problem (at least from my use perspective) with the original code as well.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Thanks again for the reply.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Dec 2018 14:55:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-12-05T14:55:44Z</dc:date>
    <item>
      <title>iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/7932367#M233996</link>
      <description>&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;This is my first post and I have a tricky request.&lt;/P&gt;&lt;P&gt;Can someone help to achieve the renaming of solid bodies by array list - click on the solid body and rename by a pre-defined name list (dropdownlist) from excel or text document?&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a mix from the post:&lt;/P&gt;&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.ae/2012/02/ilogic-to-rename-all-solid-bodies.html" target="_blank"&gt;http://inventortrenches.blogspot.ae/2012/02/ilogic-to-rename-all-solid-bodies.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.ae/2013/07/ilogic-add-standard-virtual-parts-from.html" target="_blank"&gt;http://inventortrenches.blogspot.ae/2013/07/ilogic-add-standard-virtual-parts-from.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.ae/2013/01/ilogic-solid-body-visibility.html" target="_blank"&gt;http://inventortrenches.blogspot.ae/2013/01/ilogic-solid-body-visibility.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main idea is to always assure same part names when making components for example for furniture like TOP PANEL or RIGHT PANEL and this in an easy way to avoid writing always over and over again same naming.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your input and ideas are well appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Apr 2018 06:29:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/7932367#M233996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-14T06:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/7932826#M233997</link>
      <description>&lt;P&gt;Here is an iLogic solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To be ran from the part file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add extra names by just adding more lines of oList.Add, following the current format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It runs in a loop until you hit escape during selection or use the exit button during list box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
	Dim oList As New List(Of String)
	oList.Add("Top")
	oList.Add("Right Panel")
	
	Do
		oBody = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartBodyFilter, "Pick Body to Rename")
		If oBody Is Nothing
			GoTo ExitSelectLoop
		End If
		oName = InputListBox("Select the name for this body", oList)&lt;BR /&gt;                If oName &amp;lt;&amp;gt; "" Then
		    oBody.Name = oName&lt;BR /&gt;                Else&lt;BR /&gt;                    GoTo ExitSelectLoop&lt;BR /&gt;                End if
	Loop
ExitSelectLoop:
End Sub&lt;/PRE&gt;</description>
      <pubDate>Sat, 14 Apr 2018 17:10:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/7932826#M233997</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2018-04-14T17:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/7933208#M233998</link>
      <description>&lt;P&gt;.... you guys rock!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested it and is exactly what I am looking for - awesome and well done.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wich I would have the knowledge you guys have - but working on it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your support!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Apr 2018 03:56:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/7933208#M233998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-15T03:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8445803#M233999</link>
      <description>&lt;P&gt;Not sure if this is the best place to post this follow-on request, but seems to be the latest thread referencing this rule:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.ae/2012/02/ilogic-to-rename-all-solid-bodies.html" target="_blank"&gt;http://inventortrenches.blogspot.ae/2012/02/ilogic-to-rename-all-solid-bodies.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been trying to add a simple If /Then condition to this rule so that it will only rename bodies in a multi-body part that are marked for export (or, alternatively, only bodies that are visible). &amp;nbsp;Often I have bodies in a multi-body part that will not make the cut to be a part in the assembly for which I am making components, and therefore I would like the rule to skip these bodies when numbering in sequence so the resulting assembly does not have gaps in part numbers. &amp;nbsp;I have also tried to make the skipping behavior contingent on body visibility, but always get an error with my code (which I’m sure is just totally incorrect). &amp;nbsp;Any thoughts? &amp;nbsp;Seems like this should be an easy one for you guys.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 04:35:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8445803#M233999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-05T04:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8446922#M234000</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;You probably would have been better making a new thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;However, based on the code in your supplied link&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and using the API help to figure out the available calls:&lt;/P&gt;
&lt;P&gt;(found here: &lt;A href="http://help.autodesk.com/view/INVNTOR/2019/ENU/?guid=GUID-F20C9F1B-2BB1-4B7E-BA3E-FF1731F9F0DA" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2019/ENU/?guid=GUID-F20C9F1B-2BB1-4B7E-BA3E-FF1731F9F0DA&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The modified code should look something like this:&lt;/P&gt;
&lt;PRE&gt;'check for custom iProperty and add it if not found
Dim prefix As String = "Prefix"
customPropertySet = ThisDoc.Document.PropertySets.Item _
("Inventor User Defined Properties")

Try
         prop= customPropertySet.Item(prefix)
Catch
      ' Assume error means not found
            customPropertySet.Add("", prefix)
End Try

'write the part number to the Prefix iProperty if it is empty
if iProperties.Value("Custom", "Prefix") = "" Then
iProperties.Value("Custom", "Prefix") = iProperties.Value("Project", "Part Number") &amp;amp; "_"
else
end if

'check that this active document is a part file   
Dim partDoc As PartDocument
If ThisApplication.ActiveDocument.DocumentType &amp;lt;&amp;gt; kPartDocumentObject Then
MessageBox.Show ("Please open a part document", "iLogic")
End If

'define the active document
partDoc = ThisApplication.ActiveDocument
Dim solid As SurfaceBody
Dim i As Integer

'get input from user
prefix = InputBox("Enter a prefix for the solid body names", "iLogic", iProperties.Value("Custom", "Prefix"))

'write input back to custom iProperty
iProperties.Value("Custom", "Prefix") = prefix
i = 1
'renam&lt;BR /&gt;e all solid bodies incrementing suffix
For Each solid In partDoc.ComponentDefinition.SurfaceBodies&lt;BR /&gt;&lt;STRONG&gt;    If solid.Exported = True&lt;/STRONG&gt;
        solid.Name = prefix + IIf(i &amp;lt; 10, "0" + CStr(i), CStr(i))&lt;BR /&gt;&lt;STRONG&gt;    end if&lt;/STRONG&gt;&lt;BR /&gt;    i = i + 1
Next&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Dec 2018 14:30:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8446922#M234000</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2018-12-05T14:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8447025#M234001</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A id="link_23" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2511355" target="_self"&gt;MechMachineMan&lt;/A&gt;!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Looks like I had the "end if" in the wrong place.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Only thing is, that code still numbers the parts based on the sequence in the browser, i.e. if the first body in my browser is a reference body (not marked for export) then the first part in exported assembly will be Prefix-02.&amp;nbsp; Maybe it's too&amp;nbsp;complicated, but is there a way to have the rule only change the names of bodies to be exported &lt;EM&gt;and&lt;/EM&gt; number only those bodies in sequence?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;I suppose this was a problem (at least from my use perspective) with the original code as well.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Thanks again for the reply.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 14:55:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8447025#M234001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-05T14:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8474352#M234002</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The supplied code works great, however as was previously mentioned is there a way&lt;/P&gt;
&lt;P&gt;to only rename visible solids in this manner?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or alternately is there a way to rename only selected solids&lt;/P&gt;
&lt;P&gt;potentially using pick?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know what you think&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Bruce&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 07:16:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8474352#M234002</guid>
      <dc:creator>bruce.blundell</dc:creator>
      <dc:date>2018-12-18T07:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8475986#M234003</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes. Move the&lt;/P&gt;
&lt;P&gt;i = i + 1&lt;/P&gt;
&lt;P&gt;line inside of the If statement that controls the processing criteria.&lt;/P&gt;
&lt;P&gt;ie; move it up 2 lines above the "End If".&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 16:44:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8475986#M234003</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2018-12-18T16:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8475996#M234004</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4671456"&gt;@bruce.blundell&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sure. Use the appropriate call available on the solid object with an appropriate "If" statement to cause the rule to process as you require. (Much the like If solid.Exported = True, except more like "If solid.Visible = true")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, you can search around more on the forums to find code that would process a "select set" (which is better than pick functionality in this case) and figure out how to modify the code to use that as a criteria instead of the "if" statements.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 16:46:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8475996#M234004</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2018-12-18T16:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - Naming solid bodies with dropdown list as a standard name</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8479793#M234005</link>
      <description>&lt;P&gt;Perfect that's great, works a treat&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 00:36:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/ilogic-naming-solid-bodies-with-dropdown-list-as-a-standard-name/m-p/8479793#M234005</guid>
      <dc:creator>bruce.blundell</dc:creator>
      <dc:date>2018-12-20T00:36:12Z</dc:date>
    </item>
  </channel>
</rss>

