<?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: Connector Class in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11720868#M56585</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you for your reply. This code didn't work in my case. I will try to explain in details. In the first image it is two of first model, and when you&amp;nbsp;connect first to first model my parameter ROLLER must be OFF. And that is ok with me. In the second image it is first model which connects with second model. In that case, first model must turn on the ROLLER&amp;nbsp;&amp;nbsp;on the side it is connected to. And in the third image there are final models with the values I need. I can do this manually, but I need&amp;nbsp;it to be automatic, because I have too many models in my project, and I can't change that parameter manually.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Feb 2023 07:20:37 GMT</pubDate>
    <dc:creator>jelica.rakovicJY7DU</dc:creator>
    <dc:date>2023-02-01T07:20:37Z</dc:date>
    <item>
      <title>Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11715033#M56579</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone! I need some help with connector class. I know how to transfer the parameters between models in Assembly, but parameters which I put in Assembly transfer from first to second model and I need it the opposite way. I want them transfered from second to first model. For example, when I put my first model with the parameter ROLLER = "OFF" and connect second model with the parameter ROLLER = "ON", I need the parameter ROLLER from the first model to change its value to ON, as parameter in the second model.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 08:21:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11715033#M56579</guid>
      <dc:creator>jelica.rakovicJY7DU</dc:creator>
      <dc:date>2023-01-30T08:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11715311#M56580</link>
      <description>&lt;P&gt;HI!&lt;/P&gt;&lt;P&gt;Can you post the models?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 10:59:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11715311#M56580</guid>
      <dc:creator>CCarreiras</dc:creator>
      <dc:date>2023-01-30T10:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11715361#M56581</link>
      <description>&lt;P&gt;This is my models.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 11:27:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11715361#M56581</guid>
      <dc:creator>jelica.rakovicJY7DU</dc:creator>
      <dc:date>2023-01-30T11:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11715853#M56582</link>
      <description>&lt;P&gt;One method is a ilogic rule like so. In the main assembly place ilogic rule. Change Part1:1/Part2:1 to your occurrence names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;If Parameter(Part2:1,"ROLLER") = "ON" Then&lt;BR /&gt;   Parameter(Part1:1,"ROLLER") = "ON"&lt;BR /&gt;End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 15:04:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11715853#M56582</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-01-30T15:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11717787#M56583</link>
      <description>&lt;P&gt;Thank you for your reply. I need it to be automatically, because I have more models which I put in my assembly, and change those parameters in factory properties. So, when I connect first to first model I need models without rollers, ROLLER=OFF, and when I put second to first I need roller from that side.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 07:06:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11717787#M56583</guid>
      <dc:creator>jelica.rakovicJY7DU</dc:creator>
      <dc:date>2023-01-31T07:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11718932#M56584</link>
      <description>&lt;P&gt;You could have a rule to run on save or manually to loop through occurrences and check for the parameter and if found change its value.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  Dim Position as String = "On"

   'Get the active assembly.
    Dim AsmDoc As AssemblyDocument = ThisDoc.Document

    'Get the assembly component definition.
    Dim AsmDef As AssemblyComponentDefinition = AsmDoc.ComponentDefinition

    'Get all of the leaf occurrences of the assembly.
    Dim LeafOccs As ComponentOccurrencesEnumerator = AsmDef.Occurrences.AllLeafOccurrences

    'Iterate through the occurrences.  
 For Each Occ As ComponentOccurrence In LeafOccs
		Dim occDef As PartComponentDefinition = Occ.Definition
		Dim OccDoc As PartDocument = occDef.Document

		If  OccDoc.IsModifiable Then
			Logger.Info(Occ.Name)

            Dim Params As Parameters = occDef.Parameters
            Try
           Params.Item("ROLLER").Value = Position
            Catch
            End Try
		End If
    Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a little hard to follow your workflow so if you want more assistance please post some images of the browser tree and changes to be made and a list of where the models are in the main assembly.&amp;nbsp; Maybe you want all parameters to match occurrence 1 parameters? If so that is possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 15:31:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11718932#M56584</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-01-31T15:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11720868#M56585</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for your reply. This code didn't work in my case. I will try to explain in details. In the first image it is two of first model, and when you&amp;nbsp;connect first to first model my parameter ROLLER must be OFF. And that is ok with me. In the second image it is first model which connects with second model. In that case, first model must turn on the ROLLER&amp;nbsp;&amp;nbsp;on the side it is connected to. And in the third image there are final models with the values I need. I can do this manually, but I need&amp;nbsp;it to be automatic, because I have too many models in my project, and I can't change that parameter manually.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 07:20:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11720868#M56585</guid>
      <dc:creator>jelica.rakovicJY7DU</dc:creator>
      <dc:date>2023-02-01T07:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11722691#M56586</link>
      <description>&lt;P&gt;Here is an update to this .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Logic is the following.&amp;nbsp;&lt;/P&gt;&lt;P&gt;First/Second Model Combination&lt;/P&gt;&lt;P&gt;If Second Model in assembly Then&lt;BR /&gt;First model parameter of Roller_2 = ON&lt;BR /&gt;End If&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;  'Get the active assembly.
    Dim AsmDoc As AssemblyDocument = ThisDoc.Document

    'Get the assembly component definition.
    Dim AsmDef As AssemblyComponentDefinition = AsmDoc.ComponentDefinition

    'Get all of the leaf occurrences of the assembly.
    Dim LeafOccs As ComponentOccurrencesEnumerator = AsmDef.Occurrences.AllLeafOccurrences
	
	Dim RollerRight As String

	    'Iterate through the occurrences.  
	 For Each Occ As ComponentOccurrence In LeafOccs
			'Look for second item in the assembly.
			If Occ.Name = "Second_Model:1" Then
				RollerRight = "ON"
			End If
	 Next
	 
	     'Iterate through the occurrences.  
	 For Each Occ As ComponentOccurrence In LeafOccs
			Logger.Info(Occ.Name)
			Dim occDef As PartComponentDefinition = Occ.Definition
			
			'Control first model based on second model being in the assembly.
			If Occ.Name = "First_Model:1" Then
	            Dim Params As Parameters = occDef.Parameters
	            Try
	           		Params.Item("Roller_2").Value = RollerRight
	            Catch
	            End Try
			End If
	 Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 21:33:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11722691#M56586</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-02-01T21:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11723535#M56587</link>
      <description>&lt;P&gt;It's work! But, I have another problem.&amp;nbsp;&lt;SPAN&gt;In the rule are written, the numbers and names of first model, and the numbers and names of the second one in assembly. If I put more than one model, that rule that you sent me, makes no sense, because I do not know the exact number of models which I should put.&amp;nbsp;Example is on image. Is there a way to pass parameter without models name?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tree.PNG" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1170407i2AF1CE3DCA7D1A97/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tree.PNG" alt="Tree.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 08:11:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11723535#M56587</guid>
      <dc:creator>jelica.rakovicJY7DU</dc:creator>
      <dc:date>2023-02-02T08:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11724518#M56588</link>
      <description>&lt;P&gt;That is correct as the occurrence name is always placed with the index value of the number of occureences in the assembly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A change to use the function string.contains method should work for this. You only search for the portion of the string that is static.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If Occ.Name.Contains("Second_Model")" Then
   RollerRight = "ON"
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 15:03:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11724518#M56588</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-02-02T15:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Connector Class</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11726504#M56589</link>
      <description>&lt;P&gt;It's work! Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 06:19:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/connector-class/m-p/11726504#M56589</guid>
      <dc:creator>jelica.rakovicJY7DU</dc:creator>
      <dc:date>2023-02-03T06:19:30Z</dc:date>
    </item>
  </channel>
</rss>

