<?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: Uncheck &amp;quot;Date checked&amp;quot; in a drawing and its main assembly or part in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/uncheck-quot-date-checked-quot-in-a-drawing-and-its-main/m-p/8088985#M85744</link>
    <description>&lt;P&gt;Added some loop to go over all drawing views in all sheets, the following code only contains the case that setting iProperty of top level of the reference document of the drawing view, but not the &lt;SPAN&gt;occurrences&amp;nbsp; or&amp;nbsp;&lt;/SPAN&gt;sub occurrences of the referenced document if&amp;nbsp;it is&amp;nbsp;an assembly document. There need be some change if you need the function implemented on all level sub occurrences.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sub Entrance()&lt;BR /&gt; Dim oDwgDoc As DrawingDocument&lt;BR /&gt; Set oDwgDoc = ThisApplication.ActiveDocument&lt;BR /&gt; &lt;BR /&gt; Dim oSheet As Sheet&lt;BR /&gt; Dim oDrawingView As DrawingView&lt;BR /&gt; Dim oModelDoc As Document&lt;BR /&gt; &lt;BR /&gt; For Each oSheet In oDwgDoc.Sheets&lt;BR /&gt; oSheet.Activate&lt;BR /&gt; For Each oDrawingView In oSheet.DrawingViews&lt;BR /&gt; Set oModelDoc = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument&lt;BR /&gt; ClearDate oModelDoc&lt;BR /&gt; Next&lt;BR /&gt; Next&lt;BR /&gt;End Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sub ClearDate(oDoc As Document)&lt;BR /&gt; ' Get the PropertySets object.&lt;BR /&gt; Dim oPropSets As PropertySets&lt;BR /&gt; Set oPropSets = oDoc.PropertySets&lt;/P&gt;
&lt;P&gt;' Get the design tracking property set.&lt;BR /&gt; Dim oPropSet As PropertySet&lt;BR /&gt; 'Set oPropSet = oPropSets.Item("Design Tracking Properties")&lt;/P&gt;
&lt;P&gt;oPropSets.Item("Design Tracking Properties").Item("Date Checked").Value = "01.01.1601 01:00:00"&lt;BR /&gt;End Sub&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jun 2018 09:44:09 GMT</pubDate>
    <dc:creator>JaneFan</dc:creator>
    <dc:date>2018-06-25T09:44:09Z</dc:date>
    <item>
      <title>Uncheck "Date checked" in a drawing and its main assembly or part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/uncheck-quot-date-checked-quot-in-a-drawing-and-its-main/m-p/8088737#M85739</link>
      <description>&lt;P&gt;Hej hej,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am trying in VBA to uncheck the "Date checked" box in the iproperties in a drawing and at the same time&amp;nbsp;in its main assembly or main part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have the following code that works for the active document itself:&lt;/P&gt;&lt;PRE&gt;    ' Get the active document.
    Dim oDoc As Document
    Set oDoc = ThisApplication.ActiveDocument

    ' Get the PropertySets object.
    Dim oPropSets As PropertySets
    Set oPropSets = oDoc.PropertySets

    ' Get the design tracking property set.
    Dim oPropSet As PropertySet
    'Set oPropSet = oPropSets.Item("Design Tracking Properties")


oPropSets.Item("Design Tracking Properties").Item("Date Checked").Value = "01.01.1601 01:00:00"

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i am trying to get the main assembly or part from the drawing and change it as well, but i cant get it together...&lt;/P&gt;&lt;P&gt;I found this code that seems to point me in the right direction. I don't need to open the main assembly but change the "date checked" property.&lt;/P&gt;&lt;PRE&gt;Dim oDwgDoc As DrawingDocument
    Set oDwgDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Dim oDrawingView As DrawingView
Dim oModelDoc As Document

For Each oSheet In oDwgDoc.Sheets
oSheet.Activate
Set oDrawingView = oSheet.DrawingViews.Item(1)
Set oModelDoc = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument
Call ThisApplication.Documents.Open(oModelDoc.FullDocumentName, True) ' False for invisbly opened
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me out with this or point me into the right direction?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 07:28:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/uncheck-quot-date-checked-quot-in-a-drawing-and-its-main/m-p/8088737#M85739</guid>
      <dc:creator>n_krisch</dc:creator>
      <dc:date>2018-06-25T07:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Uncheck "Date checked" in a drawing and its main assembly or part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/uncheck-quot-date-checked-quot-in-a-drawing-and-its-main/m-p/8088985#M85744</link>
      <description>&lt;P&gt;Added some loop to go over all drawing views in all sheets, the following code only contains the case that setting iProperty of top level of the reference document of the drawing view, but not the &lt;SPAN&gt;occurrences&amp;nbsp; or&amp;nbsp;&lt;/SPAN&gt;sub occurrences of the referenced document if&amp;nbsp;it is&amp;nbsp;an assembly document. There need be some change if you need the function implemented on all level sub occurrences.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sub Entrance()&lt;BR /&gt; Dim oDwgDoc As DrawingDocument&lt;BR /&gt; Set oDwgDoc = ThisApplication.ActiveDocument&lt;BR /&gt; &lt;BR /&gt; Dim oSheet As Sheet&lt;BR /&gt; Dim oDrawingView As DrawingView&lt;BR /&gt; Dim oModelDoc As Document&lt;BR /&gt; &lt;BR /&gt; For Each oSheet In oDwgDoc.Sheets&lt;BR /&gt; oSheet.Activate&lt;BR /&gt; For Each oDrawingView In oSheet.DrawingViews&lt;BR /&gt; Set oModelDoc = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument&lt;BR /&gt; ClearDate oModelDoc&lt;BR /&gt; Next&lt;BR /&gt; Next&lt;BR /&gt;End Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sub ClearDate(oDoc As Document)&lt;BR /&gt; ' Get the PropertySets object.&lt;BR /&gt; Dim oPropSets As PropertySets&lt;BR /&gt; Set oPropSets = oDoc.PropertySets&lt;/P&gt;
&lt;P&gt;' Get the design tracking property set.&lt;BR /&gt; Dim oPropSet As PropertySet&lt;BR /&gt; 'Set oPropSet = oPropSets.Item("Design Tracking Properties")&lt;/P&gt;
&lt;P&gt;oPropSets.Item("Design Tracking Properties").Item("Date Checked").Value = "01.01.1601 01:00:00"&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 09:44:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/uncheck-quot-date-checked-quot-in-a-drawing-and-its-main/m-p/8088985#M85744</guid>
      <dc:creator>JaneFan</dc:creator>
      <dc:date>2018-06-25T09:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Uncheck "Date checked" in a drawing and its main assembly or part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/uncheck-quot-date-checked-quot-in-a-drawing-and-its-main/m-p/8089225#M85751</link>
      <description>&lt;P&gt;Hi JaneFan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;works perfect! &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; Thank you very much!&lt;BR /&gt;I just needed the top level - no occurences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added one line:&lt;/P&gt;&lt;PRE&gt; ClearDate oDwgDoc&lt;/PRE&gt;&lt;P&gt;so it will uncheck the date in the drawing as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 11:43:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/uncheck-quot-date-checked-quot-in-a-drawing-and-its-main/m-p/8089225#M85751</guid>
      <dc:creator>n_krisch</dc:creator>
      <dc:date>2018-06-25T11:43:32Z</dc:date>
    </item>
  </channel>
</rss>

