<?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 sketch text in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305868#M50037</link>
    <description>&lt;P&gt;Do you want to work with all local iLogic rules, or do you prefer external iLogic rules for this solution?&lt;/P&gt;&lt;P&gt;What action do you want to trigger the sketch text to change?&amp;nbsp; Do you just want to run a local rule within the main assembly to make it all happen?&amp;nbsp; Or maybe you want it so that when you change the value of the text parameter in the assembly, it causes a local rule within the assembly to run that will push that value to the part, then run a rule in the part to change the text in the sketch?&amp;nbsp; It will be easier to set-up the parameter change triggering if you are using local rules in both cases, but it can also be done using external rules if needed (just requires more work/set-up).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If using local rules, and you want the change to happen when you change the parameter value within the main assembly, here is some example local iLogic rule codes you can try:&lt;/P&gt;&lt;P&gt;Within the main assembly document, create a new rule and copy/paste this following code into it.&amp;nbsp; You will need to change the path &amp;amp; file name to the target Part file, or get the Part file in another way, if needed.&amp;nbsp; (You can delete the comments, once you get it working OK.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'try to specify/find/get the target part document
'it should already be 'initiated' because it's within the assembly, so we don't need to specifically open it
Dim oPDoc As PartDocument
Try
	'&amp;lt;&amp;lt;&amp;lt;&amp;lt; CHANGE THIS PATH &amp;amp; FILE NAME &amp;gt;&amp;gt;&amp;gt;&amp;gt;
	'or get the part document another way, if needed
	oPDoc = ThisApplication.Documents.ItemByName("C:\Temp\MyPart.ipt")
Catch
	MsgBox("Couldn't find the Part document named 'MyPart.ipt'. Exiting.")
	Exit Sub
End Try
Dim oPrtParam As Inventor.Parameter
Try
	oPrtParam = oPDoc.ComponentDefinition.Parameters.Item("EngravingL")
Catch
	MsgBox("Couldn't find the parameter named 'EngravingL' within the Part. Exiting.")
	Exit Sub
End Try
'set the value of the part's parameter to the value of the assemblies parameter
'when using a 'blue' local parameter name, it will trigger this rule to run when its value changes
oPrtParam.Value = Engraving 'local' parameter (should turn blue) within the Assembly&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then within the Part document, change its local rule code to this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oPDoc As PartDocument = ThisDoc.Document 'points to the 'local' document
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
For Each oSketch As PlanarSketch In oPDef.Sketches
	For Each oTextBox As Inventor.TextBox In oSketch.TextBoxes
		oTextBox.Text = EngravingL 'local parameter (should turn blue)
	Next
Next&lt;/LI-CODE&gt;&lt;P&gt;You may have to update the part and/or assembly after wards to see the changes, or simply include an extra line of code in them to RebuildAll or Update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&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;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you want and have time, I would appreciate your Vote(s) for &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank" rel="noopener"&gt;My IDEAS &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt;&lt;/SPAN&gt;&lt;/A&gt;or you can Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank" rel="noopener"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 May 2021 16:42:29 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2021-05-11T16:42:29Z</dc:date>
    <item>
      <title>ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10302145#M50033</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have this code in one part, and it works ok.&lt;BR /&gt;But If I try to control the text from an assembly,&lt;BR /&gt;"I did a "Text Parameter" in assembly "Engraving"and that parameter is = whit a "Text Parameter" in part "EngravingL" from part and "EngravingL" it shoud be the text in the sketch."&lt;BR /&gt;I get this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTextbox&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TextBox&lt;/SPAN&gt;
    &lt;SPAN&gt;oPartDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCd&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSketch&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PlanarSketch&lt;/SPAN&gt;

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oCd&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oPartDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinitions&lt;/SPAN&gt;
    &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oSketch&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oCd&lt;/SPAN&gt;.&lt;SPAN&gt;Sketches&lt;/SPAN&gt;
        &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oTextbox&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oSketch&lt;/SPAN&gt;.&lt;SPAN&gt;TextBoxes&lt;/SPAN&gt;
			&lt;SPAN&gt;oTextbox&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt; = &lt;SPAN&gt;EngravingL&lt;/SPAN&gt;
        &lt;SPAN&gt;Next&lt;/SPAN&gt;
    &lt;SPAN&gt;Next&lt;/SPAN&gt;
    
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vaida_cosmin_0-1620638478336.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/917046i8EDE3067FAC9BEC8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vaida_cosmin_0-1620638478336.png" alt="vaida_cosmin_0-1620638478336.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vaida_cosmin_1-1620638522034.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/917047iC95CA11865624F6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vaida_cosmin_1-1620638522034.png" alt="vaida_cosmin_1-1620638522034.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 09:22:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10302145#M50033</guid>
      <dc:creator>Cosmin_V</dc:creator>
      <dc:date>2021-05-10T09:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10304623#M50034</link>
      <description>&lt;P&gt;Are you sure that the code runs only in the part and not in the assembly?&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 08:11:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10304623#M50034</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2021-05-11T08:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305252#M50035</link>
      <description>&lt;P&gt;The code is set in part.&lt;/P&gt;&lt;P&gt;As it is now, it doesn't work in the assembly. Maybe with some adjustments ... I would like it more if it worked from assembly&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 12:33:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305252#M50035</guid>
      <dc:creator>Cosmin_V</dc:creator>
      <dc:date>2021-05-11T12:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305830#M50036</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7420987"&gt;@Cosmin_V&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked for me to set the textbox value of each assembly sketch.&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" rel="noopener"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim oDoc As Document
Dim oTextbox As TextBox
    oDoc = ThisApplication.ActiveDocument
Dim oCd As ComponentDefinition
Dim oSketch As PlanarSketch

For Each oCd In oDoc.ComponentDefinitions
    For Each oSketch In oCd.Sketches
        For Each oTextbox In oSketch.TextBoxes
			oTextbox.Text = "Test"
        Next
    Next    
Next&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:17:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305830#M50036</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2021-05-11T16:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305868#M50037</link>
      <description>&lt;P&gt;Do you want to work with all local iLogic rules, or do you prefer external iLogic rules for this solution?&lt;/P&gt;&lt;P&gt;What action do you want to trigger the sketch text to change?&amp;nbsp; Do you just want to run a local rule within the main assembly to make it all happen?&amp;nbsp; Or maybe you want it so that when you change the value of the text parameter in the assembly, it causes a local rule within the assembly to run that will push that value to the part, then run a rule in the part to change the text in the sketch?&amp;nbsp; It will be easier to set-up the parameter change triggering if you are using local rules in both cases, but it can also be done using external rules if needed (just requires more work/set-up).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If using local rules, and you want the change to happen when you change the parameter value within the main assembly, here is some example local iLogic rule codes you can try:&lt;/P&gt;&lt;P&gt;Within the main assembly document, create a new rule and copy/paste this following code into it.&amp;nbsp; You will need to change the path &amp;amp; file name to the target Part file, or get the Part file in another way, if needed.&amp;nbsp; (You can delete the comments, once you get it working OK.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'try to specify/find/get the target part document
'it should already be 'initiated' because it's within the assembly, so we don't need to specifically open it
Dim oPDoc As PartDocument
Try
	'&amp;lt;&amp;lt;&amp;lt;&amp;lt; CHANGE THIS PATH &amp;amp; FILE NAME &amp;gt;&amp;gt;&amp;gt;&amp;gt;
	'or get the part document another way, if needed
	oPDoc = ThisApplication.Documents.ItemByName("C:\Temp\MyPart.ipt")
Catch
	MsgBox("Couldn't find the Part document named 'MyPart.ipt'. Exiting.")
	Exit Sub
End Try
Dim oPrtParam As Inventor.Parameter
Try
	oPrtParam = oPDoc.ComponentDefinition.Parameters.Item("EngravingL")
Catch
	MsgBox("Couldn't find the parameter named 'EngravingL' within the Part. Exiting.")
	Exit Sub
End Try
'set the value of the part's parameter to the value of the assemblies parameter
'when using a 'blue' local parameter name, it will trigger this rule to run when its value changes
oPrtParam.Value = Engraving 'local' parameter (should turn blue) within the Assembly&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then within the Part document, change its local rule code to this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oPDoc As PartDocument = ThisDoc.Document 'points to the 'local' document
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
For Each oSketch As PlanarSketch In oPDef.Sketches
	For Each oTextBox As Inventor.TextBox In oSketch.TextBoxes
		oTextBox.Text = EngravingL 'local parameter (should turn blue)
	Next
Next&lt;/LI-CODE&gt;&lt;P&gt;You may have to update the part and/or assembly after wards to see the changes, or simply include an extra line of code in them to RebuildAll or Update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&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;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you want and have time, I would appreciate your Vote(s) for &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank" rel="noopener"&gt;My IDEAS &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt;&lt;/SPAN&gt;&lt;/A&gt;or you can Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank" rel="noopener"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:42:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305868#M50037</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-05-11T16:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305941#M50038</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7420987"&gt;@Cosmin_V&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After reading&amp;nbsp;WCrihfield's reply it occurred to me that you might be wanting to set the text in the sketches of all parts from the assembly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are a couple more examples.&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" rel="noopener"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sets the same text to all parts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument

oText = InputBox("Enter Text:", "iLogic", "Test")

Dim oDoc As Document
For Each oDoc In oAsmDoc.AllReferencedDocuments
	If oDoc.DocumentType = kPartDocumentObject Then		
		Dim oCd As ComponentDefinition
		Dim oSketch As PlanarSketch
		
		For Each oCd In oDoc.ComponentDefinitions
		    For Each oSketch In oCd.Sketches
		        For Each oTextbox In oSketch.TextBoxes
					oTextbox.Text = oText					
		        Next
		    Next    
		Next			
	End If 
Next 

InventorVb.DocumentUpdate()&lt;/LI-CODE&gt;
&lt;P&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;This sets each part to use a different entered text value&lt;/P&gt;
&lt;P&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;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument

Dim oDoc As Document
For Each oDoc In oAsmDoc.AllReferencedDocuments
	If oDoc.DocumentType = kPartDocumentObject Then
		
		Dim oCd As ComponentDefinition
		Dim oSketch As PlanarSketch
			
		For Each oCd In oDoc.ComponentDefinitions
		    For Each oSketch In oCd.Sketches
		        For Each oTextbox In oSketch.TextBoxes
					oText = InputBox _
					("Enter Text for " &amp;amp; oDoc.DisplayName, "iLogic", oTextbox.Text)
					oTextbox.Text = oText
					
		        Next
		    Next    
		Next
			
	End If 
Next 

InventorVb.DocumentUpdate()&lt;/LI-CODE&gt;
&lt;P&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;And here is an example that looks for a parameter in all the occurences named EngravingL and sets that if it is used (this assumes that parameter is being called into the text box)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument

oText = InputBox("Enter EngravingL text:", "iLogic", "Test")

Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmDoc.ComponentDefinition.Occurrences
	Try
		Parameter(oOcc.Name, "EngravingL") = oText
	Catch 'error when parameter not found
	End Try
Next 

InventorVb.DocumentUpdate()&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 May 2021 17:34:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10305941#M50038</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2021-05-11T17:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10308213#M50039</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;No one works! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a 4-piece ensemble. 3 have the same engraved code, and one another code.&lt;/P&gt;&lt;P&gt;I have set the code (from the first post) in all parts.&lt;/P&gt;&lt;P&gt;And I create a "Text parameter" in each part. (EngarvingL) which should be engraved on each part.&lt;/P&gt;&lt;P&gt;And in assembly I create 2&amp;nbsp;&amp;nbsp;"Text parameter" "Engarving_Finger_Text" and&amp;nbsp;"Engarving_Plate_Text"&lt;/P&gt;&lt;P&gt;And a rule ...&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;o00292307&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;"EngravingL"&lt;/SPAN&gt;)  = &lt;SPAN&gt;Engraving_Finger_Text&lt;BR /&gt;Parameter(o00292308.Name, "EngravingL") = Engraving_Finger_Text&lt;BR /&gt;Parameter(o00292309.Name, "EngravingL") = Engraving_Finger_Text&lt;/SPAN&gt;
&lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;o00292310&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;"EngravingL"&lt;/SPAN&gt;)  = &lt;SPAN&gt;Engraving_Plate_Text&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;And I put in form&amp;nbsp;the parameters&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Engraving_Finger_Text&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Engraving_Plate_Text&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 May 2021 13:24:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10308213#M50039</guid>
      <dc:creator>Cosmin_V</dc:creator>
      <dc:date>2021-05-12T13:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10308251#M50040</link>
      <description>&lt;P&gt;this is the error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vaida_cosmin_0-1620826735298.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/918022iB9168ECDCB0DE614/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vaida_cosmin_0-1620826735298.png" alt="vaida_cosmin_0-1620826735298.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vaida_cosmin_1-1620826745834.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/918023iC62CFEAF6C636B16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vaida_cosmin_1-1620826745834.png" alt="vaida_cosmin_1-1620826745834.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 13:39:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10308251#M50040</guid>
      <dc:creator>Cosmin_V</dc:creator>
      <dc:date>2021-05-12T13:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10308467#M50041</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7420987"&gt;@Cosmin_V&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I put this rule in the assembly, it will update the parameter called EngravingL&amp;nbsp;in the part file... when that parameter is used in the part sketch it will update to show both assembly parameter values, when those value are updated from the assembly form.&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;
&lt;LI-CODE lang="general"&gt;Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument

oTrigger = Engarving_Finger_Text
oTrigger = Engraving_Plate_Text

Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmDoc.ComponentDefinition.Occurrences
	Try
		'set the parameter value in the part
		Parameter(oOcc.Name, "EngravingL") = _
		Parameter("Engarving_Finger_Text") &amp;amp; " " &amp;amp; Parameter("Engraving_Plate_Text")
	Catch 'error when parameter not found
	End Try
	

Next 

InventorVb.DocumentUpdate()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 15:04:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10308467#M50041</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2021-05-12T15:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10317505#M50042</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But whatever I do, I get this error! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error in rule: Rule0, in document: 00292309.ipt&lt;/P&gt;&lt;P&gt;Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.PartDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{29F0D463-C114-11D2-B77F-0060B0F159EF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 08:00:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10317505#M50042</guid>
      <dc:creator>Cosmin_V</dc:creator>
      <dc:date>2021-05-17T08:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10317778#M50043</link>
      <description>&lt;P&gt;I fixed it...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I change....&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;oPartDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Whit ....&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;oPartDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 11:07:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10317778#M50043</guid>
      <dc:creator>Cosmin_V</dc:creator>
      <dc:date>2021-05-17T11:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: ilogic sketch text</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10318716#M50044</link>
      <description>&lt;P&gt;Glad to hear you got it working OK.&amp;nbsp; Issues involving multiple documents and multiple iLogic rules can sometimes be challenging for others to diagnose remotely.&amp;nbsp; &lt;A href="https://knowledge.autodesk.com/community/article/353376" target="_blank" rel="noopener"&gt;Here is a link to one of my contribution posts&lt;/A&gt; that I think you'll find interesting/helpful, that sort of relates to the problem you were having with the document reference.&amp;nbsp; It attempts to help explain most of the different document references, and when/where they are best used.&amp;nbsp; Good luck in your future iLogic endeavors.&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 17:26:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-sketch-text/m-p/10318716#M50044</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-05-17T17:26:10Z</dc:date>
    </item>
  </channel>
</rss>

