<?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: Updating idw styles and getting double prompt...would like just one. in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567624#M145477</link>
    <description>&lt;P&gt;That second error screen indicates that the error happened while it was performing an 'UpdateFromGlobal' method on a Style.&amp;nbsp; Are your styles/style libraries located locally on each machine, or are they stored centrally, like on a server?&amp;nbsp; If on a server, then if mapped drives are being used, make sure everyone has the same drive letter for that location, otherwise you may have to eliminate the use of mapped drive letters in your paths, and use the full path back to the server in your paths.&amp;nbsp; Just one tip I picked up due to similar sounding issues a couple years ago.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Nov 2022 15:30:30 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2022-11-21T15:30:30Z</dc:date>
    <item>
      <title>Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557202#M145275</link>
      <description>&lt;P&gt;Hello All....&lt;/P&gt;&lt;P&gt;Scripting some iLogic to update idw styles.&lt;/P&gt;&lt;P&gt;I have the logic working but just would like one prompt instead of a prompt for every style that is out of date (at least I think that is what is happening).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a link to a video...&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.screencast.com/t/IkOqZF3HZj" target="_blank"&gt;https://www.screencast.com/t/IkOqZF3HZj&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the iLogic...&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'This logic runs thru all of Drawings Styles and updates them.&lt;/SPAN&gt;

&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()
&lt;SPAN&gt;OpenDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;oStyles&lt;/SPAN&gt; = &lt;SPAN&gt;OpenDoc&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;Styles&lt;/SPAN&gt;

&lt;SPAN&gt;'Runs thru all Styles and see if they are up to date&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Style&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oStyles&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt;.&lt;SPAN&gt;UpToDate&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		
&lt;SPAN&gt;'		Pop up message asking if you want to update styles&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;msg&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;MsgBoxResult&lt;/SPAN&gt; = &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Update to Current Drawing Styles?"&lt;/SPAN&gt;, &lt;SPAN&gt;"Styles Update"&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;YesNoCancel&lt;/SPAN&gt;,
		&lt;SPAN&gt;MessageBoxIcon&lt;/SPAN&gt;.&lt;SPAN&gt;Exclamation&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxDefaultButton&lt;/SPAN&gt;.&lt;SPAN&gt;Button2&lt;/SPAN&gt;)
		
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;msg&lt;/SPAN&gt; = &lt;SPAN&gt;vbYes&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;oStyle&lt;/SPAN&gt;.&lt;SPAN&gt;UpdateFromGlobal&lt;/SPAN&gt;
		&lt;SPAN&gt;Else&lt;/SPAN&gt;
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;OpenDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Save&lt;/SPAN&gt;

&lt;SPAN&gt;Catch&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;

&lt;SPAN&gt;'Tells user that Styles have been updated.&lt;/SPAN&gt;
&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Drawing Styles have been Updated"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbCr&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oFile&lt;/SPAN&gt;)

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!!!!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 17:59:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557202#M145275</guid>
      <dc:creator>steveh3</dc:creator>
      <dc:date>2022-11-16T17:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557221#M145277</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/45931"&gt;@steveh3&lt;/a&gt;.&amp;nbsp; This should do it for you.&amp;nbsp; I just got rid of the question in the middle of the loop, and the conditional statement, based on the answer to that question.&amp;nbsp; Then condensed some stuff a bit.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;'This logic runs thru all of Drawings Styles and updates them.
Sub Main()
	OpenDoc = ThisDoc.Document
	oStyles = OpenDoc.StylesManager.Styles
	'Runs thru all Styles and see if they are up to date
	For Each oStyle As Style In oStyles
		If Not oStyle.UpToDate Then oStyle.UpdateFromGlobal
	Next
	Try : OpenDoc.Save : 	Catch : End Try
	'Tells user that Styles have been updated.
	MessageBox.Show("Drawing Styles have been Updated" &amp;amp; vbCr &amp;amp; oFile)
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt; ACCEPT SOLUTION &lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 18:04:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557221#M145277</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-11-16T18:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557231#M145278</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;Thanks for the insight....but I would like to be prompted ONCE to update all Styles.&lt;/P&gt;&lt;P&gt;Your suggestion took the question out completely.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Steve H.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 18:10:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557231#M145278</guid>
      <dc:creator>steveh3</dc:creator>
      <dc:date>2022-11-16T18:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557256#M145279</link>
      <description>&lt;P&gt;OK, I misunderstood.&amp;nbsp; I thought the one prompt you were talking about was the one at the end.&amp;nbsp; Here is a version with a question before the loop, asking if you want to proceed with updating all drawing styles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;'This logic runs thru all of Drawings Styles and updates them.
Sub Main()
	OpenDoc = ThisDoc.Document
	oStyles = OpenDoc.StylesManager.Styles
	oAns = MessageBox.Show("Do you want to update all Styles in this drawing?", _
	"Update Drawing Styles", MessageBoxButtons.YesNo, MessageBoxIcon.Question, _
	MessageBoxDefaultButton.Button2)
	If oAns = DialogResult.Yes Then
		'Runs thru all Styles and update them, if needed
		For Each oStyle As Style In oStyles
			If Not oStyle.UpToDate Then oStyle.UpdateFromGlobal
		Next
	End If
	Try : OpenDoc.Save : Catch : End Try
	'Tells user that Styles have been updated.
	MessageBox.Show("Drawing Styles have been Updated" &amp;amp; vbCr &amp;amp; oFile)
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 18:23:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557256#M145279</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-11-16T18:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557322#M145281</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again...there was a bug in your code, so I tweaked a bit. Think there was a problem with Dialog box codde.&lt;/P&gt;&lt;P&gt;It runs now, but it even prompts me to update styles even when they are already up to date.&lt;/P&gt;&lt;P&gt;Anyway to get around that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'This logic runs thru all of Drawings Styles and updates them.&lt;/SPAN&gt;
&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()
	&lt;SPAN&gt;OpenDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
	&lt;SPAN&gt;oStyles&lt;/SPAN&gt; = &lt;SPAN&gt;OpenDoc&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;Styles&lt;/SPAN&gt;
	
	&lt;SPAN&gt;'		Pop up message asking if you want to update styles&lt;/SPAN&gt;
		&lt;SPAN&gt;oAns&lt;/SPAN&gt; = &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Update to Current Drawing Styles?"&lt;/SPAN&gt;, &lt;SPAN&gt;"Styles Update"&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;YesNoCancel&lt;/SPAN&gt;,
		&lt;SPAN&gt;MessageBoxIcon&lt;/SPAN&gt;.&lt;SPAN&gt;Exclamation&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxDefaultButton&lt;/SPAN&gt;.&lt;SPAN&gt;Button2&lt;/SPAN&gt;)
	
	
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oAns&lt;/SPAN&gt; = &lt;SPAN&gt;DialogResult&lt;/SPAN&gt;.&lt;SPAN&gt;Yes&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;'Runs thru all Styles and update them, if needed&lt;/SPAN&gt;
		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Style&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oStyles&lt;/SPAN&gt;
			&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt;.&lt;SPAN&gt;UpToDate&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt;.&lt;SPAN&gt;UpdateFromGlobal&lt;/SPAN&gt;
		&lt;SPAN&gt;Next&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;Try&lt;/SPAN&gt; : &lt;SPAN&gt;OpenDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Save&lt;/SPAN&gt; : &lt;SPAN&gt;Catch&lt;/SPAN&gt; : &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;'Tells user that Styles have been updated.&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Drawing Styles have been Updated"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbCr&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oFile&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; Best,&lt;/P&gt;&lt;P&gt;Steve H.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 18:59:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557322#M145281</guid>
      <dc:creator>steveh3</dc:creator>
      <dc:date>2022-11-16T18:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557369#M145282</link>
      <description>&lt;P&gt;If we create a Boolean type variable named something like 'RequiresUpdate', set to False initially, then loop all drawing styles before the main question, checking if each is 'UpToDate', and as soon as any one of them returns False, then set the boolean variable to True, then exit the loop.&amp;nbsp; Then check the value of that boolean.&amp;nbsp; If False, simply exit the rule, because no update is needed.&amp;nbsp; But if it is True, then ask the question, then if Yes, run the rest of the rule, as before.&amp;nbsp; This requires two loops of all styles though, instead of just the one, so it would be less efficient, but would get the job done the way you want.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 19:20:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557369#M145282</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-11-16T19:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557568#M145288</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the guidance. With your help, I'm really close.&lt;/P&gt;&lt;P&gt;If I run the iLogic manually, does exactly what I need it to do.&lt;/P&gt;&lt;P&gt;But, if I attach it to an Event Trigger so that on Drawings it runs "After Open Document, it errors.&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="steveh_0-1668631215820.png" style="width: 387px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1140690i5734B2DB28E68CC6/image-dimensions/387x321?v=v2" width="387" height="321" role="button" title="steveh_0-1668631215820.png" alt="steveh_0-1668631215820.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'This logic runs thru all of Drawings Styles and updates them.&lt;/SPAN&gt;
&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()
	&lt;SPAN&gt;OpenDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
	&lt;SPAN&gt;oStyles&lt;/SPAN&gt; = &lt;SPAN&gt;OpenDoc&lt;/SPAN&gt;.&lt;SPAN&gt;StylesManager&lt;/SPAN&gt;.&lt;SPAN&gt;Styles&lt;/SPAN&gt;
	
&lt;SPAN&gt;'Sets Update dialog to initially False&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;RequiresUpdate&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
	
&lt;SPAN&gt;'Runs thru all Styles and switches to RequiresUpdate to True&lt;/SPAN&gt;
		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Style&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oStyles&lt;/SPAN&gt;
			&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt;.&lt;SPAN&gt;UpToDate&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;RequiresUpdate&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
		&lt;SPAN&gt;Next&lt;/SPAN&gt;	
	
	
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;RequiresUpdate&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;	
	&lt;SPAN&gt;'		Pop up message asking if you want to update styles&lt;/SPAN&gt;
		&lt;SPAN&gt;oAns&lt;/SPAN&gt; = &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Update to Current Drawing Styles?"&lt;/SPAN&gt;, &lt;SPAN&gt;"Styles Update"&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;YesNoCancel&lt;/SPAN&gt;,
		&lt;SPAN&gt;MessageBoxIcon&lt;/SPAN&gt;.&lt;SPAN&gt;Exclamation&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxDefaultButton&lt;/SPAN&gt;.&lt;SPAN&gt;Button2&lt;/SPAN&gt;)
	
	
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oAns&lt;/SPAN&gt; = &lt;SPAN&gt;DialogResult&lt;/SPAN&gt;.&lt;SPAN&gt;Yes&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;'Runs thru all Styles and update them, if needed&lt;/SPAN&gt;
		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Style&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oStyles&lt;/SPAN&gt;
			&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt;.&lt;SPAN&gt;UpToDate&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;oStyle&lt;/SPAN&gt;.&lt;SPAN&gt;UpdateFromGlobal&lt;/SPAN&gt;
		&lt;SPAN&gt;Next&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;'Tells user that Styles have been updated.&lt;/SPAN&gt;
&lt;SPAN&gt;'	MessageBox.Show("Drawing Styles have been Updated!" + vbCrLf + vbCrLf + "PLEASE Review all Dimensions and Balloons" &amp;amp; vbCr &amp;amp; oFile)&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;


	&lt;SPAN&gt;Try&lt;/SPAN&gt; : &lt;SPAN&gt;OpenDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Save&lt;/SPAN&gt; : &lt;SPAN&gt;Catch&lt;/SPAN&gt; : &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oAns&lt;/SPAN&gt; = &lt;SPAN&gt;DialogResult&lt;/SPAN&gt;.&lt;SPAN&gt;Yes&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
&lt;SPAN&gt;'Tells user that Styles have been updated.&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Drawing Styles have been Updated!"&lt;/SPAN&gt; + &lt;SPAN&gt;vbCrLf&lt;/SPAN&gt; + &lt;SPAN&gt;vbCrLf&lt;/SPAN&gt; + &lt;SPAN&gt;"PLEASE Review all Dimensions and Balloons"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbCr&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oFile&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 20:41:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11557568#M145288</guid>
      <dc:creator>steveh3</dc:creator>
      <dc:date>2022-11-16T20:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11559152#M145308</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/45931"&gt;@steveh3&lt;/a&gt;.&amp;nbsp; I am not sure.&amp;nbsp; What does the error message say?&amp;nbsp; Could you include what both tabs of the error message say when it pops-up?&amp;nbsp; There is usually a pretty good clue somewhere within the More Info tab, that would tell us what it was trying to do when the error was encountered, which will usually make it easier for us to pinpoint which line of code that is happening at.&amp;nbsp; Since you said it is working OK when ran manually, that makes me think there may be a timing issue involved.&amp;nbsp; Maybe the rule is triggered to run too early after the document is opened, and it maybe has not fully loaded all styles related stuff.&amp;nbsp; Just a thought.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 13:43:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11559152#M145308</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-11-17T13:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11560310#M145319</link>
      <description>&lt;P&gt;So, I went and re-did my triggers and now it works without error.&amp;nbsp; Went thru around 30 idw's and all seems well&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@1E018E9C237C1988568EE667885B902C/emoticons/1f601.png" alt=":beaming_face_with_smiling_eyes:" title=":beaming_face_with_smiling_eyes:" /&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;for the expertise!!!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 19:56:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11560310#M145319</guid>
      <dc:creator>steveh3</dc:creator>
      <dc:date>2022-11-17T19:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567597#M145476</link>
      <description>&lt;P&gt;So,&amp;nbsp; moving this iLogic over to another machine and periodically I get this error on the second machine. I was getting same error on my machine at first too. I can't seem to get it on my machine now. Opening same file as other machine. He gets error I don't.&lt;/P&gt;&lt;P&gt;I'm pretty sure it has something to do with the trigger. I run the logic manually and not thru the trigger, I don't get an error on that second machine. Originally, my machine was acting same way.&lt;/P&gt;&lt;P&gt;Here's the error....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="steveh_0-1669044145359.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1142425i00F53949FE8244BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="steveh_0-1669044145359.png" alt="steveh_0-1669044145359.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="steveh_1-1669044158517.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1142427iA3C50AC6E6728058/image-size/medium?v=v2&amp;amp;px=400" role="button" title="steveh_1-1669044158517.png" alt="steveh_1-1669044158517.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Steve H.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 15:22:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567597#M145476</guid>
      <dc:creator>steveh3</dc:creator>
      <dc:date>2022-11-21T15:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567624#M145477</link>
      <description>&lt;P&gt;That second error screen indicates that the error happened while it was performing an 'UpdateFromGlobal' method on a Style.&amp;nbsp; Are your styles/style libraries located locally on each machine, or are they stored centrally, like on a server?&amp;nbsp; If on a server, then if mapped drives are being used, make sure everyone has the same drive letter for that location, otherwise you may have to eliminate the use of mapped drive letters in your paths, and use the full path back to the server in your paths.&amp;nbsp; Just one tip I picked up due to similar sounding issues a couple years ago.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 15:30:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567624#M145477</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-11-21T15:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567654#M145478</link>
      <description>&lt;P&gt;Yes...they are locally, we store in Vault and push down to our C: drive every night.&lt;/P&gt;&lt;P&gt;I was just able to repeat it on my machine again. Same error.&lt;/P&gt;&lt;P&gt;Hmmm????&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 15:43:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567654#M145478</guid>
      <dc:creator>steveh3</dc:creator>
      <dc:date>2022-11-21T15:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Updating idw styles and getting double prompt...would like just one.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567701#M145479</link>
      <description>&lt;P&gt;I guess to help avoid this error, you could just replace this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;If Not oStyle.UpToDate Then oStyle.UpdateFromGlobal&lt;/LI-CODE&gt;
&lt;P&gt;...with this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;If Not oStyle.UpToDate Then
	Try : oStyle.UpdateFromGlobal : Catch : End Try
End If&lt;/LI-CODE&gt;
&lt;P&gt;It doesn't explain why the error is happening, but helps you keep moving forward.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 16:04:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/updating-idw-styles-and-getting-double-prompt-would-like-just/m-p/11567701#M145479</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-11-21T16:04:45Z</dc:date>
    </item>
  </channel>
</rss>

