<?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>Thema "Parameter von einer Baugruppe, mittels iLogic, in ein Bauteil mit ModelStates schreiben - Write parameters from an assembly to a part with Model States using iLogic" in Inventor - Deutsches Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12216411#M2496</link>
    <description>&lt;P&gt;Hallo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wenn man einen Parameter von einer Baugruppe, mittels iLogic, in ein Bauteil schreiben möchte ist das einfach möglich durch folgende Zeile :&lt;BR /&gt;&lt;BR /&gt;[translated with Google]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you want to write a parameter from an assembly to a component using iLogic, this is easily possible with the following line:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;"elbow"&lt;/SPAN&gt;, &lt;SPAN&gt;"material"&lt;/SPAN&gt;) = &lt;SPAN&gt;material&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Will man jedoch das gleich machen, wenn das Bauteil Modellzustände enthält, bekommt man eine Fehlermeldung, da vermutlich nicht definiert wurde auf welchen Modelzustand man den Parameter übergeben möchte.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gibt es hier eine Möglichkeit wie man den Parameter auf einen bestimmten Modellzustand bzw. auf alle Modellzustände übergeben kann?&lt;BR /&gt;&lt;BR /&gt;[translated with Google]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;However, if you want to do the same if the component contains model states, you will get an error message, since it is likely that the model state to which the parameter is to be passed has not been defined.&lt;/P&gt;
&lt;P&gt;Is there a way to transfer the parameter to a specific model state or to all model states?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2023 18:12:05 GMT</pubDate>
    <dc:creator>f.danecker</dc:creator>
    <dc:date>2023-09-05T18:12:05Z</dc:date>
    <item>
      <title>Parameter von einer Baugruppe, mittels iLogic, in ein Bauteil mit ModelStates schreiben - Write parameters from an assembly to a part with Model States using iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12216411#M2496</link>
      <description>&lt;P&gt;Hallo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wenn man einen Parameter von einer Baugruppe, mittels iLogic, in ein Bauteil schreiben möchte ist das einfach möglich durch folgende Zeile :&lt;BR /&gt;&lt;BR /&gt;[translated with Google]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you want to write a parameter from an assembly to a component using iLogic, this is easily possible with the following line:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;"elbow"&lt;/SPAN&gt;, &lt;SPAN&gt;"material"&lt;/SPAN&gt;) = &lt;SPAN&gt;material&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Will man jedoch das gleich machen, wenn das Bauteil Modellzustände enthält, bekommt man eine Fehlermeldung, da vermutlich nicht definiert wurde auf welchen Modelzustand man den Parameter übergeben möchte.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gibt es hier eine Möglichkeit wie man den Parameter auf einen bestimmten Modellzustand bzw. auf alle Modellzustände übergeben kann?&lt;BR /&gt;&lt;BR /&gt;[translated with Google]&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;However, if you want to do the same if the component contains model states, you will get an error message, since it is likely that the model state to which the parameter is to be passed has not been defined.&lt;/P&gt;
&lt;P&gt;Is there a way to transfer the parameter to a specific model state or to all model states?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 18:12:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12216411#M2496</guid>
      <dc:creator>f.danecker</dc:creator>
      <dc:date>2023-09-05T18:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter von einer Baugruppe, mittels iLogic, in ein Bauteil mit ModelStates schreiben</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12216602#M2497</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You can use these lines of code to extend it to all model states or just the active one.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;FactoryDocument&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;ModelStates&lt;/SPAN&gt;.&lt;SPAN&gt;MemberEditScope&lt;/SPAN&gt; = &lt;SPAN&gt;MemberEditScopeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kEditAllMembers&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;FactoryDocument&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;ModelStates&lt;/SPAN&gt;.&lt;SPAN&gt;MemberEditScope&lt;/SPAN&gt; = &lt;SPAN&gt;MemberEditScopeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kEditActiveMember&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This post should help you :&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/update-parameter-using-ilogic-in-all-modelstates/td-p/11797405" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/update-parameter-using-ilogic-in-all-modelstates/td-p/11797405&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Vincent.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 12:41:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12216602#M2497</guid>
      <dc:creator>vpeuvion</dc:creator>
      <dc:date>2023-09-04T12:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter von einer Baugruppe, mittels iLogic, in ein Bauteil mit ModelStates schreiben</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12231129#M2498</link>
      <description>&lt;P&gt;Ich habe das Problem jetzt mit folgender Regel lösen können:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim oelbowOcc As ComponentOccurrence = oDoc.ComponentDefinition.Occurrences.ItemByName("elbow")
Dim elbowCompDef As PartComponentDefinition = oelbowOcc.Definition.Document.componentdefinition
Dim elbowFacDoc As PartDocument = elbowCompDef.FactoryDocument
Dim oMSs As ModelStates = elbowFacDoc.ComponentDefinition.ModelStates
Dim oActiveMS As ModelState = oMSs.ActiveModelState
oMSs.MemberEditScope = MemberEditScopeEnum.kEditActiveMember
'iPropertie Material
Dim oDTPropSet As PropertySet = elbowFacDoc.PropertySets.Item("Design Tracking Properties")
Dim oProjectProp As Inventor.Property = oDTPropSet.Item("Material")
Dim PropMaterial As String = material
'MsgBox(PropMaterial)
'Material für jeden Modellzustand im Bauteil ändern.
For Each oMS As ModelState In oMSs
    'Modellzustand aktvieieren
    oMS.Activate
    'MsgBox(oMS.Name)
    
        'hier wird die Materialbibliothek abgerufen --&amp;gt; Material muss in der Bibliothek vorhanden sein!
        For Each Asset_Material As MaterialAsset In ThisApplication.AssetLibraries.Item("Library").MaterialAssets
            
            'Wenn das Material gefunden wird, dann wird dieses in den iProperties für den aktiven Modellzustand geändert
            If Asset_Material.DisplayName = material Then
                ThisApplication.ActiveMaterialLibrary = ThisApplication.AssetLibraries.Item("Library")
                'iProperties.Material = mat
                oProjectProp.Value = PropMaterial
                'MsgBox(oProjectProp.Value)
                Logger.Info("Werkstoff erfolgreich geändert")   
                Exit For
            
        End If  
        Next    
    
Next
oActiveMS.Activate
elbowFacDoc.Update2
oDoc.Update2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 07:31:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12231129#M2498</guid>
      <dc:creator>f.danecker</dc:creator>
      <dc:date>2023-09-11T07:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter von einer Baugruppe, mittels iLogic, in ein Bauteil mit ModelStates schreiben</title>
      <link>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12921222#M2499</link>
      <description>&lt;P&gt;Guten Tag,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ist es mit Ihrem Code möglich, auch nur einen oder mehrere benannte Parameter aus einer Baugruppe in eine Untergeordnete Baugruppe oder Bauteil mit Modellzuständen zu übergeben?&lt;/P&gt;&lt;P&gt;Vielen Dank schon einmal für Ihre Rückmeldung.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 08:13:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-deutsches-forum/parameter-von-einer-baugruppe-mittels-ilogic-in-ein-bauteil-mit/m-p/12921222#M2499</guid>
      <dc:creator>thomas_h_T36UT</dc:creator>
      <dc:date>2024-07-26T08:13:39Z</dc:date>
    </item>
  </channel>
</rss>

