<?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: why does this ilogic code  not work? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9277625#M105048</link>
    <description>&lt;P&gt;the problem is not that it do not trigger , but it trigger on the old file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to reset the some properties on the new files create when you do&amp;nbsp;a save as or use the copy ryeplace ... I am almost 100% sure that it work before ...on a earlier version of this&amp;nbsp;code ... but After I up date to 2020.2.1 I have could not get the new or the old code to work ..but I might just been fools by an addin program we have .. can´t be 100% sure&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2020 18:48:41 GMT</pubDate>
    <dc:creator>Darkforce_the_ilogic_guy</dc:creator>
    <dc:date>2020-01-27T18:48:41Z</dc:date>
    <item>
      <title>why does this ilogic code  not work?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9276827#M105035</link>
      <description>&lt;P&gt;I am running an ilogic code after save. I want to set som properties if this is the first time it have been save&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my problem is that it does not change the properties .. but it seems that the code is running as it should&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Nulstill SaveAs og Save and replace file
Sub Main()
Dim oDoc As Document =ThisApplication.ActiveDocument 'ThisDoc.Document 'ThisApplication.ActiveDocument
oDoc.DisplayName = ""

If oDoc.FileSaveCounter &amp;gt; 1 Then
	debug("Have been Save more Then one time")
	'Return
ElseIf oDoc.FileSaveCounter = 1 Then
	debug("Save For the first Time " &amp;amp; ThisDoc.FileName(True))
	ExcelPath  = "C:\Working Folder\CAD\Kallesoe\Kallesoe iLogic\PDFLOg.xlsx"
	ExcelSheet = "LastSaveFile"
	GoExcel.Open(ExcelPath, ExcelSheet)
	Dim LastFileNavn = GoExcel.CellValue(ExcelPath, ExcelSheet, "C3") 
	Dim Emtry =GoExcel.CellValue(ExcelPath, ExcelSheet, "C4")
	GoExcel.Save
	GoExcel.Close

'Test code reset SaveAs
debug(LastFileNavn &amp;amp;" was Save Last")
If LastFileNavn &amp;lt;&amp;gt; Emtry Then
	debug("1")
	'oDoc.DisplayName = ""
	debug("1.1")
oTime = Now.ToShortDateString
debug("1.2")
iProperties.Value("Project", "Creation Date") = oTime
debug("1.3")
Try
	debug("1.4")
iProperties.Value("Custom", "Surface") = ""
debug("1.5")
Catch
	debug("1.6")
End Try
oNAME = ThisApplication.GeneralOptions.UserName
debug("1.7")
iProperties.Value("Project", "Designer") = oNAME
debug("1.8")
iProperties.Value("Project", "Revision Number") = 0
'oDoc
'iProperties.Value(docFName, "Project", "Revision Number") = 0
debug("1.9")
'Test code end
iLogicVb.UpdateWhenDone = True

Else
	debug("2")
End If 
Try
ThisApplication.CommandManager.StartCommand(CommandIDEnum.kFileSaveCommand)
Catch
	

End Try
	'Run the remainder of your code
	GoExcel.Open(ExcelPath, ExcelSheet)
	GoExcel.CellValue(ExcelPath, ExcelSheet, "C3") =""
	GoExcel.Save
	GoExcel.Close
	End If

End Sub

Public Sub debug(txt As String)
	Trace.WriteLine("NTI : " &amp;amp; txt)
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revision Number are not been set to 0 and&amp;nbsp;Designer are not been set to&amp;nbsp;oNAME even if after the debug code are running 1.7 ,1.8 and 1.9 are running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can this be ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 13:50:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9276827#M105035</guid>
      <dc:creator>Darkforce_the_ilogic_guy</dc:creator>
      <dc:date>2020-01-27T13:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: why does this ilogic code  not work?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9277506#M105046</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use FileSaveCounter = 0&lt;/P&gt;
&lt;PRE&gt;Nulstill SaveAs og Save and replace file
Sub Main()
Dim oDoc As Document =ThisApplication.ActiveDocument 'ThisDoc.Document 'ThisApplication.ActiveDocument
oDoc.DisplayName = ""

If oDoc.FileSaveCounter &amp;gt; 0 Then
	debug("Have been Save more Then one time")
	'Return
ElseIf oDoc.FileSaveCounter = 0 Then&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 17:57:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9277506#M105046</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2020-01-27T17:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: why does this ilogic code  not work?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9277625#M105048</link>
      <description>&lt;P&gt;the problem is not that it do not trigger , but it trigger on the old file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to reset the some properties on the new files create when you do&amp;nbsp;a save as or use the copy ryeplace ... I am almost 100% sure that it work before ...on a earlier version of this&amp;nbsp;code ... but After I up date to 2020.2.1 I have could not get the new or the old code to work ..but I might just been fools by an addin program we have .. can´t be 100% sure&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 18:48:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9277625#M105048</guid>
      <dc:creator>Darkforce_the_ilogic_guy</dc:creator>
      <dc:date>2020-01-27T18:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: why does this ilogic code  not work?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9277731#M105055</link>
      <description>&lt;P&gt;Could you send the file in question?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 19:39:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/why-does-this-ilogic-code-not-work/m-p/9277731#M105055</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2020-01-27T19:39:34Z</dc:date>
    </item>
  </channel>
</rss>

