<?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 rule - Add Description value after file name for Member display Name in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5235951#M124380</link>
    <description>&lt;P&gt;Hi Curtis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if you could provide some additional syntax to the original iLogic rule below&lt;/P&gt;&lt;P&gt;This runs fine at the part level but looking at a way to run all rules at the part level from the assembly level&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a scenario where we use Vault copy design to copy assemblies and parts, then rename&lt;/P&gt;&lt;P&gt;On open, the old file names are displayed and each part needs to be opend individually to run the rule to update the display name to contain new file name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would this be possibel to run once thru a rule from the assembly level?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Max Bodnar&lt;/P&gt;</description>
    <pubDate>Wed, 27 Aug 2014 03:32:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-08-27T03:32:57Z</dc:date>
    <item>
      <title>iLogic rule - Add Description value after file name for Member display Name only</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5063062#M124377</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know if possible to write the following rule using iLogic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If default Description field has a value for example "PLATE"&lt;/P&gt;&lt;P&gt;make the MemberDisplayName = Filename_Description (ie. 1234_PLATE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If default Description field has empty value&lt;/P&gt;&lt;P&gt;Do nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont want to change the file name from whatever file name is assigned by user (ie. 1234.ipt) but simply change the MemberDiplayName to append Description value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If possible, can you share example code of how this could be achieved&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Max B&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 12:14:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5063062#M124377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-29T12:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic rule - Add Description value after file name for Member display Name</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5063456#M124378</link>
      <description>&lt;P&gt;Hi mbodnar,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a quick iLogic rule that should work for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;doc = ThisDoc.Document
Filename_Description = iProperties.Value("Project", "Part Number") _
&amp;amp; "_" &amp;amp; iProperties.Value("Project", "Description")
'check for a description iProperty value
'Trim removes spaces in case the description is just a space
If Trim(iProperties.Value("Project", "Description")) &amp;lt;&amp;gt; "" Then
'set the display name
doc.DisplayName = Filename_Description
Else 
'reset the display name
doc.DisplayName = ""
End If&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 14:51:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5063456#M124378</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2014-05-29T14:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic rule - Add Description value after file name for Member display Name</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5064582#M124379</link>
      <description>&lt;P&gt;Hi Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much, exactly what I was after.&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Max B&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 23:43:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5064582#M124379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-29T23:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic rule - Add Description value after file name for Member display Name</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5235951#M124380</link>
      <description>&lt;P&gt;Hi Curtis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if you could provide some additional syntax to the original iLogic rule below&lt;/P&gt;&lt;P&gt;This runs fine at the part level but looking at a way to run all rules at the part level from the assembly level&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a scenario where we use Vault copy design to copy assemblies and parts, then rename&lt;/P&gt;&lt;P&gt;On open, the old file names are displayed and each part needs to be opend individually to run the rule to update the display name to contain new file name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would this be possibel to run once thru a rule from the assembly level?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Max Bodnar&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 03:32:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5235951#M124380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T03:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic rule - Add Description value after file name for Member display Name</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5237307#M124381</link>
      <description>&lt;P&gt;Hi mbodnar,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a variation of this that can be run from the assembly to udpate all of the components. I didn't have a chance to test it well, so post back if you run into issues, but it seemed to work well in the limited testing I did.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recomend making this an &lt;STRONG&gt;external rule&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://autodeskmfg.typepad.com/blog/2012/01/working-with-external-ilogic-rules.html" target="_blank"&gt;http://autodeskmfg.typepad.com/blog/2012/01/working-with-external-ilogic-rules.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'Define the open document
Dim openDoc As Document
openDoc = ThisDoc.Document
iLogicVb.UpdateWhenDone = True
'Look at all of the files referenced in the open document
Dim docFile As Document
For Each docFile In openDoc.AllReferencedDocuments                
'format  file name                   
Dim FNamePos As Long
FNamePos = InStrRev(docFile.FullFileName, "\", -1)                        
Dim docFName As String 
docFName = Right(docFile.FullFileName, Len(docFile.FullFileName) - FNamePos) 
Filename_Description = iProperties.Value(docFName, "Project", "Part Number") _
&amp;amp; "_" &amp;amp; iProperties.Value(docFName, "Project", "Description")
   'check for a description iProperty value
   'Trim removes spaces in case the description is just a space
   If Trim(iProperties.Value(docFName, "Project", "Description")) &amp;lt;&amp;gt; "" Then
   'set the display name
    docFile.DisplayName = Filename_Description
    Else 
    'reset the display name
     docFile.DisplayName = ""
    End If
Next&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:55:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5237307#M124381</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2014-08-27T15:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic rule - Add Description value after file name for Member display Name</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5238527#M124382</link>
      <description>&lt;P&gt;Hi Curtis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much that works great!!&lt;/P&gt;&lt;P&gt;Do you know if it is possible to exclude certain components from running this rule on, for example Content Center Files?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently it flags all files and I have a workaround, but if the rule can exclude CC parts, that would be mcuh better&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Max Bodnar&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2014 01:30:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5238527#M124382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-28T01:30:29Z</dc:date>
    </item>
    <item>
      <title>iLogic check if part is content center part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5239961#M124383</link>
      <description>&lt;P&gt;Hi mbodnar,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a quick example rule that looks at the parts (and only the parts) in the assembly and determines if it is a content center part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'Define the open document
Dim openDoc As Document
openDoc = ThisDoc.Document

'Look at all of the files referenced in the open document
Dim docFile As Document

For Each docFile In openDoc.AllReferencedDocuments                
'format  file name                   
Dim FNamePos As Long
FNamePos = InStrRev(docFile.FullFileName, "\", -1)                        
Dim docFName As String 
docFName = Right(docFile.FullFileName, Len(docFile.FullFileName) - FNamePos) 
	'check for part files only
	If docFile.DocumentType = kPartDocumentObject Then 
		'check for Conent Center Part
		If docFile.ComponentDefinition.IsContentMember = True Then
		MessageBox.Show("This is a Content Center part. ", docFName )
		Else
		MessageBox.Show("This is NOT a Content Center part. ", docFName )
		End If
	Else
	End If
Next&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2014 15:10:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/5239961#M124383</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2014-08-28T15:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic rule - Add Description value after file name for Member display Name</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/7211986#M124384</link>
      <description>&lt;P&gt;Hi Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just came across this post and your rule does exactly what I need it too in terms of renaming all the parts in an assembly. What would be amazing is to go one step further and for the rule to be able to do sub assemblies as well. At the moment if you run the rule in a top level assembly with sub-assemblies it successfully goes through and renames all the parts in the sub-assemblies but doesn't rename the sub-assemblies themselves. Is that an easy extra step to take??&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 08:52:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/7211986#M124384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-07T08:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic rule - Add Description value after file name for Member display Name</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/9013512#M124385</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible to have a code that shows the File Name(as the part is saved) and the Description displayed in brackets in the model tree.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 09:42:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-add-description-value-after-file-name-for-member/m-p/9013512#M124385</guid>
      <dc:creator>dberrie</dc:creator>
      <dc:date>2019-09-09T09:42:52Z</dc:date>
    </item>
  </channel>
</rss>

