<?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 Write iPropertie from .idw to part in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8327384#M89995</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know if it possible to write an iProperty in the IDW to the iProperties of the part that is placed in the IDW.&lt;/P&gt;&lt;P&gt;The iProperty is the "Pagenumber" of the idw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;have build an configurator which will print different IDWs with different pagenumbers and after processing, it needs to be written to the part number. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Oct 2018 12:01:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-11T12:01:10Z</dc:date>
    <item>
      <title>Write iPropertie from .idw to part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8327384#M89995</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know if it possible to write an iProperty in the IDW to the iProperties of the part that is placed in the IDW.&lt;/P&gt;&lt;P&gt;The iProperty is the "Pagenumber" of the idw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;have build an configurator which will print different IDWs with different pagenumbers and after processing, it needs to be written to the part number. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 12:01:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8327384#M89995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-11T12:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Write iPropertie from .idw to part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8327407#M89996</link>
      <description>&lt;P&gt;Not on a normal day.&amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;P&gt;The model drives the drawing, not the other way around.&amp;nbsp; Only way I can think of would be through iLogic.&lt;/P&gt;
&lt;P&gt;What is your scenario?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://0lojpg.bn1301.livefilestore.com/y4mBpjMsxHsiyE90fl7LZ99L9EQYMinMmTq-HRFH9JbCEzkKriwtHkW3fcvHd1Tn83fNmCEOxlu43NSCaM5t5LTUVxzkr2SykXazzjlH6fe8HEZ9J9xESPFwabQTX5LJ7gKPlhZsl0LCsXsW74obCNtIOOvc57pHxbFMWOTgbDVMzABJgwHnVMfJOWjsmiR3b-SgAE5duRw6SWoxUsKOxXgCw?width=220&amp;amp;height=20&amp;amp;cropmode=none" border="0" width="300" height="100" /&gt; &lt;BR /&gt;Windows 10 x64 -16GB Ram &lt;BR /&gt;Intel i7-6700 @ 3.41ghz &lt;BR /&gt;nVidia GTS 250 - 1 GB &lt;BR /&gt;Inventor Pro 2018 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 12:09:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8327407#M89996</guid>
      <dc:creator>Cadmanto</dc:creator>
      <dc:date>2018-10-11T12:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Write iPropertie from .idw to part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8327413#M89997</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to try this through iLogic, but after trying and searching multiple times, i couldn't find any solution that will match this problem&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 12:12:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8327413#M89997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-11T12:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Write iPropertie from .idw to part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8329532#M90009</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try suggestions in below blog link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/manufacturing/2018/05/ilogic-to-copy-iproperties-from-drawing-document-to-model-document.html" target="_blank"&gt;http://adndevblog.typepad.com/manufacturing/2018/05/ilogic-to-copy-iproperties-from-drawing-document-to-model-document.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 05:15:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8329532#M90009</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-10-12T05:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Write iPropertie from .idw to part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8329676#M90013</link>
      <description>&lt;P&gt;Many many thanks. This link helped me to find my solution&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 06:50:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/8329676#M90013</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-12T06:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Write iPropertie from .idw to part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/11513562#M144413</link>
      <description>&lt;P&gt;Just recovered this from google cache:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Main()
	If Not ThisApplication.ActiveDocument.DocumentType = DocumentTypeEnum.kDrawingDocumentObject Then
		Messagebox.Show("Current document is not drawing docuemnt", "Inventor")
		Exit Sub
	End If
	Dim value_List As List(Of String) = New List(Of String)

	value_List.Add(iProperties.Value("Project", "Vendor"))
	value_List.Add( iProperties.Value("Project", "Stock Number"))
	value_List.Add(iProperties.Value("Project", "Project"))
	value_List.Add(iProperties.Value("Project", "Designer"))

	Dim oDoc As Document
	oDoc = ThisDrawing.ModelDocument 

	If oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
		
		Update_Properties(oDoc,  value_List)
		
		Dim oAsyDoc As AssemblyDocument 
		oAsyDoc = oDoc
		 
		Dim oReferDoc As Document 
		Dim occ As ComponentOccurrence 
		Dim oDef As AssemblyComponentDefinition 
		oDef = oAsyDoc.ComponentDefinition  

		For Each occ In oDef.Occurrences 			
			If occ.SubOccurrences.Count = 0 Then
				oReferDoc = occ.ReferencedDocumentDescriptor.ReferencedDocument
				Update_Properties(oReferDoc, value_List)
			Else				
				oReferDoc = occ.ReferencedDocumentDescriptor.ReferencedDocument
				Update_Properties(oReferDoc,   value_List)
				processAllSubOcc(occ,  value_List)
			End If				
		Next 
		
	Else If oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
		Update_Properties(oDoc, value_List)
	End If 

End Sub 

Private Sub processAllSubOcc(ByVal oCompOcc As ComponentOccurrence , value_List As List(Of String))
    
	Dim oSubCompOcc As ComponentOccurrence
	Dim oReferDoc As Document 
    For Each oSubCompOcc In oCompOcc.SubOccurrences
        If oSubCompOcc.SubOccurrences.Count = 0 Then
            oReferDoc = oSubCompOcc.ReferencedDocumentDescriptor.ReferencedDocument
			Update_Properties(oReferDoc,value_List)			
        Else
            oReferDoc = oSubCompOcc.ReferencedDocumentDescriptor.ReferencedDocument
			Update_Properties(oReferDoc ,value_List)			
            Call processAllSubOcc(oSubCompOcc, value_List)
        End If
    Next
	
End Sub

Sub Update_Properties(oDoc As Document,   value_List As List(Of String))
	
	oDoc.PropertySets.Item("Design Tracking Properties").Item("Vendor").Value = value_List.Item(0)
	oDoc.PropertySets.Item("Design Tracking Properties").Item("Stock Number").Value = value_List.Item(1)
	oDoc.PropertySets.Item("Design Tracking Properties").Item("Project").Value = value_List.Item(2)
	oDoc.PropertySets.Item("Design Tracking Properties").Item("Designer").Value = value_List.Item(3)	 
	oDoc.Save()
	
End Sub&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Oct 2022 18:40:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/write-ipropertie-from-idw-to-part/m-p/11513562#M144413</guid>
      <dc:creator>mario.garzon</dc:creator>
      <dc:date>2022-10-27T18:40:29Z</dc:date>
    </item>
  </channel>
</rss>

