<?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 Trigger on save - Chicken and the egg! in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7799160#M80924</link>
    <description>&lt;P&gt;Alan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take a look at this post. I think it offer a solution to your problem. It allows you to run external rules from any file. We have a similar set of rules to check the iProperties and it works for us.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.co.uk/2011/08/built-for-speed-running-ilogic-rules.html" target="_blank"&gt;http://inventortrenches.blogspot.co.uk/2011/08/built-for-speed-running-ilogic-rules.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2018 11:36:02 GMT</pubDate>
    <dc:creator>dave.cutting</dc:creator>
    <dc:date>2018-02-22T11:36:02Z</dc:date>
    <item>
      <title>iLogic Trigger on save - Chicken and the egg!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7798385#M80923</link>
      <description>&lt;P&gt;I have some code that I have generated to prompt users to fill in blank&amp;nbsp;iProperties on save.&amp;nbsp;&amp;nbsp;&amp;nbsp; I would like to implement this in our standard template files for .ipt. iam. etc. but have run into some chicken and egg difficulty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically the code is triggered to run on a Save and checks to see if the relevant iProperties are null or whitespaced and if so displays a form until all fields are completed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However some will already see where I am going with this.&amp;nbsp;&amp;nbsp; If I wish to populate the new template files with this code I would prefer the iProperties to be blank&amp;nbsp;but I cannot save said template if I have the trigger enabled as it will flag up that the&amp;nbsp;iProperties fields are blank&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may just not be seeing the wood for the trees here.&amp;nbsp; &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'''_________________________________________________________________________________________________
'''AUTHOR: AG
'''  DATE: 22022018
'''   REV: 0
'''_________________________________________________________________________________________________
''' Purpose: If iProperties Project, Title, Descrption or Author are blank (or null)
''' then prompt user with pop-up form To populate these requried fields. 
'''_________________________________________________________________________________________________
''' Main code begin
''' 
''' Repeat each Do loop until iProperties Project is populated in pop-up form "Required Fields Form" 
'''
Do Until String.IsNullOrWhiteSpace(Project) = False
'''Call pop-up form "Required Fields Form"
iLogicForm.Show(“Required Fields Form”, FormMode.Modal)
'''Write Project string contents to respective iProperties
Project = iProperties.Value(“Project”, “Project”)
Loop
'''
Title = iProperties.Value(“Summary”, “Title”)
Do Until String.IsNullOrWhiteSpace(Title) = False
''' '''Call pop-up form "Required Fields Form"
iLogicForm.Show(“Required Fields Form”, FormMode.Modal)
'''Write Title string contents to respective iProperties
Title = iProperties.Value(“Summary”, “Title”)
Loop
'''
Desc = iProperties.Value(“Project”, “Description”)
Do Until String.IsNullOrWhiteSpace(Desc) = False
'''Call pop-up form "Required Fields Form"
iLogicForm.Show(“Required Fields Form”, FormMode.Modal)
'''Write Description string contents to respective iProperties
Description = iProperties.Value(“Project”, “Description”)
Loop
'''
Do Until String.IsNullOrWhiteSpace(Desc) = False
'''Call pop-up form "Required Fields Form"
iLogicForm.Show(“Required Fields Form”, FormMode.Modal)
'''Write Author string contents to respective iProperties
Author = iProperties.Value(“Project”, “Description”)
Loop
'''&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Feb 2018 09:00:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7798385#M80923</guid>
      <dc:creator>G60Dub</dc:creator>
      <dc:date>2018-02-22T09:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Trigger on save - Chicken and the egg!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7799160#M80924</link>
      <description>&lt;P&gt;Alan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take a look at this post. I think it offer a solution to your problem. It allows you to run external rules from any file. We have a similar set of rules to check the iProperties and it works for us.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://inventortrenches.blogspot.co.uk/2011/08/built-for-speed-running-ilogic-rules.html" target="_blank"&gt;http://inventortrenches.blogspot.co.uk/2011/08/built-for-speed-running-ilogic-rules.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 11:36:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7799160#M80924</guid>
      <dc:creator>dave.cutting</dc:creator>
      <dc:date>2018-02-22T11:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Trigger on save - Chicken and the egg!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7799369#M80925</link>
      <description>&lt;P&gt;Try doing a right click edit iProperties from windows explorer, iLogic won't run when editing a file that way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also setup the template to use an external iLogic script and comment out or start with a blank script, then edit the script after adding the event triggers to the templates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give those ideas a try.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 13:06:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7799369#M80925</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2018-02-22T13:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Trigger on save - Chicken and the egg!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7799572#M80926</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4758072"&gt;@G60Dub&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to the forum. What version of Inventor are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think Inventor 2018 has added some event triggers that allow you run an external rule on all files of a given type (all part files, all assembly file, etc.)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:&lt;BR /&gt;&lt;A href="http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120" target="_blank"&gt;http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120&lt;/A&gt;&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;</description>
      <pubDate>Thu, 22 Feb 2018 13:55:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7799572#M80926</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2018-02-22T13:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Trigger on save - Chicken and the egg!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7801655#M80932</link>
      <description>&lt;P&gt;1. If you have Inventor 2018.2 or later, look into using prompted entries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. If you don't, just write a "cheat" piece of code to skip the rest of the code in the rule if you enter in a certain value, for when you save it initially.&lt;/P&gt;
&lt;P&gt;ie;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If FirstiPropFilledIn = "[ExcludeME]" THen: Exit Sub: End if&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 23:35:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7801655#M80932</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2018-02-22T23:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Trigger on save - Chicken and the egg!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7808764#M81047</link>
      <description>&lt;P&gt;Hi folks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Inventor 2018.3 Pro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Changing the iProperties from Windows Explorer was handy -&amp;nbsp; It's been so long since last using this method that I had completely forgotten about its' existence so many thanks for the reminder.&amp;nbsp;&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;One of the suggestions above was using prompted entires in 2018.2 and onwards.&amp;nbsp;&amp;nbsp; I'm familiar with using prompted entries in field text in drawings but not in the context inferred above- I've had a look at what's new in 2018.2 and cannot see anything&amp;nbsp;that&amp;nbsp;is pertinent to the posts above. &amp;nbsp; &lt;img id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://forums.autodesk.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've compacted&amp;nbsp;my code slightly but still doesn't quite run the way I expect it to.- It pops up the Menu form&amp;nbsp;on first run regardless of whether the fields are populated whereas I'd prefer it to only run if any of the fields are still blank on first save.&amp;nbsp; I'm new to using VB&amp;nbsp;(have only done a bit of&amp;nbsp;Pascal and&amp;nbsp;C++ in the past) so have no idea as to what conditional&amp;nbsp;logic commands are available.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;While ((String.IsNullOrWhiteSpace(Project) = True Or (String.IsNullOrWhiteSpace(Title) = True) Or (String.IsNullOrWhiteSpace(Description) = True) Or (String.IsNullOrWhiteSpace(Author) = True)))
'
'Call pop-up form "Required Fields Form"
'
iLogicForm.Show("Required Fields Form", FormMode.Modal)
'
'Write Project string contents to respective iProperties
'
Project = iProperties.Value("Project", "Project")
Title = iProperties.Value("Summary", "Title")
Description = iProperties.Value("Project", "Description")
Author = iProperties.Value("Summary", "Author")
'
End While&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also handy to know there is a dedicated forum for coding!&amp;nbsp;&amp;nbsp; I'll keep this post here running to its' conclusion but for cody stuff will post in the respective forum going forward.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 12:31:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7808764#M81047</guid>
      <dc:creator>G60Dub</dc:creator>
      <dc:date>2018-02-26T12:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Trigger on save - Chicken and the egg!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7821887#M81306</link>
      <description>&lt;P&gt;Sorted my code - Just missed the fact that I didn't set the variable values initially and that's why the code was always running regardless of the required iProperties being populated.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 09:08:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/7821887#M81306</guid>
      <dc:creator>G60Dub</dc:creator>
      <dc:date>2018-03-02T09:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Trigger on save - Chicken and the egg!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/8758567#M96965</link>
      <description>&lt;P&gt;While ((String.IsNullOrWhiteSpace(Project) = True) Or (String.IsNullOrWhiteSpace(Title) = True) Or (String.IsNullOrWhiteSpace(Description) = True) Or (String.IsNullOrWhiteSpace(Author) = True))&lt;BR /&gt;&lt;BR /&gt;iLogicForm.ShowGlobal("iProperties Editor")&lt;BR /&gt;End While&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi , I have tried above rule based on your text , but it is keep running . I just want to run the rule to pop up the "iproperties Editor" if the iprorpeties in particular file is empty&amp;nbsp; before file is saved.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 01:27:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-trigger-on-save-chicken-and-the-egg/m-p/8758567#M96965</guid>
      <dc:creator>ankurGCK9S</dc:creator>
      <dc:date>2019-04-29T01:27:19Z</dc:date>
    </item>
  </channel>
</rss>

