• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor Engineer-to-Order

    Reply
    Active Member
    Posts: 8
    Registered: ‎12-17-2009

    Passing Dynamic Parameters into Additional Parameters

    127 Views, 1 Replies
    03-26-2012 10:03 AM

    I'm trying to write a method that will collect the dynamic paramters of one child and pass them into another.  I have the method below that will do it however the SalesadditionalParameters rule doesen't unbind to update the SalesConfigurator child.  Any one have any suggestions.  Thanks

     

          Parameter Rule TestDesignName As Name = : IvCone

     

          Method GetadditionalParameters (PartToTest As Part) As List

                Dim Tmp                 As List = {}     

                Dim DynRulesList        As List = GetDynamicRules(PartToTest)

                Dim DynRulesPList             As List = {}

                Dim DynRule                   As Name

               

                For Each DynRule In DynRulesList

                      DynRulesPList = DynRulesPList +  {DynRule, ref(PartToTest, DynRule)}

                Next

     

                Tmp  = Tmp + DynRulesPList

     

                Return Tmp

          End Method

     

          Rule SalesadditionalParameters As List = GetadditionalParameters(DesignConfigurator)

     

          Child DesignConfigurator As TestDesignName

                origin =                origin

                grounded? =                   False

                ignorePosition? =             False

                DesignConfigurator? =   True

          End Child

         

          Child SalesConfigurator As TestDesignName

                origin =                DesignConfigurator.Origin + Vector(10, 0, 0)

                grounded? =                   False

                ignorePosition? =             False

                DesignConfigurator? =   False

               

                additionalParameters = SalesadditionalParameters

          End Child

    Please use plain text.
    Employee
    Posts: 26
    Registered: ‎09-11-2007

    Re: Passing Dynamic Parameters into Additional Parameters

    03-26-2012 01:00 PM in reply to: justinrice

    Hi

    Your method will not create a dependency, it can’t since it only determines the dependency on the fly based not on rule values but on the function that assesses if the rule has a dynamic value (this last point is the problem).

     

    One thing you could do is intentionally make the salesadditionalparameters rule depend on the designconfigurator.modelself (assuming that the parameter changes will cause that to be unbound). 

     

     


    --
    Autodesk
    Elly Bachrach
    Solutions Architect
    Autodesk Global Services
    Direct +1 (847) 676-2880
    elly.bachrach@autodesk.com
    Please use plain text.