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

    Autodesk Inventor

    Reply
    Valued Contributor
    Posts: 68
    Registered: ‎03-23-2012

    iLogic to switch between iAssembly Table Rows

    252 Views, 7 Replies
    03-28-2012 08:46 AM

    I have created two table rows in an iAssembly that I would like to have a iLogic code written for.

     

    What do I need to use to trigger between these two, when, for instance, a certain numeric value is entered in the parameters?  Within the assembly file, when I use the iPart.ChangeRow (or iAssembly.ChangeRow) and put the .iam filename in the first spot, it says it cannot find the file.

     

    This is what I am using, and the error states it cannot find the .iam file I am referencing.

     

    IfParameter("Window_Cutout_Vertical")<=1AndParameter("Window_Cutout_Horizontal")<=1TheniAssembly.ChangeRow("A60_RHR_Door_Assembly.iam", "A60_RHR_Door_Assembly-02")ElseIfParameter("Window_Cutout_Vertical")>1AndParameter("Window_Cutout_Horizontal")>1TheniAssembly.ChangeRow("A60_RHR_Door_Assembly.iam", "A60_RHR_Door_Assembly-01")EndIf

     

    Please use plain text.
    Valued Mentor
    swordmaster
    Posts: 449
    Registered: ‎12-15-2008

    Re: iLogic to switch between iAssembly Table Rows

    03-28-2012 09:52 AM in reply to: nickv02

    You need to "stabalize" the name of the component in the browser. Essentially this means renaming it in the browser so rename A60_RHR_Door_Assembly.iam to something like myassembly

     

    Below is a extract from the ilogic help file

     

    "iChangedComponentName:1" is the name of the component as you see it in the Inventor assembly browser. You must manually change the default component name assigned by Inventor in order to stabilize it so it will not change when the table configuration row is modified.

    Inventor 2010 Certified Professional
    Please use plain text.
    Valued Contributor
    Posts: 68
    Registered: ‎03-23-2012

    Re: iLogic to switch between iAssembly Table Rows

    03-28-2012 11:01 AM in reply to: swordmaster

    I renamed it in the browser, and tried it again, and it still says it cannot find the file.  In this instance I renamed it A60_Door_RHR and it says it cannot find that when I check my rule.  I have attached a picture of how I have it now.

     

     

    Please use plain text.
    Valued Mentor
    swordmaster
    Posts: 449
    Registered: ‎12-15-2008

    Re: iLogic to switch between iAssembly Table Rows

    03-28-2012 01:56 PM in reply to: nickv02

    has this component always been a iassembly?

    or did you have it assembled as a "normal" assembly THEN change it to  a iassembly

    OR

    have you generated the iassembly members? this needs to be done before running the ilogic rule

    Inventor 2010 Certified Professional
    Please use plain text.
    Valued Contributor
    Posts: 68
    Registered: ‎03-23-2012

    Re: iLogic to switch between iAssembly Table Rows

    03-28-2012 02:01 PM in reply to: swordmaster

    I put it together as a normal assembly, and once it was all created, I started working with the iAssembly table layout stuff to turn parts on and off, which is where I am now.  Did I miss a step, or completely goof something by doing this?

     

    Thanks for the help so far, btw! 

    Please use plain text.
    Valued Mentor
    swordmaster
    Posts: 449
    Registered: ‎12-15-2008

    Re: iLogic to switch between iAssembly Table Rows

    03-28-2012 02:10 PM in reply to: nickv02

    If you have a (sub) assembly placed in a upper level assembly then change that (sub) assembly to a iassembly Inventor gets confused.

    In this case i would do this

    1) Generate all the members of the iassembly factory

    2) Choose the sub assembly in the Inventor browser  and do a REPLACE , replace with the iassembly parent

    3) Make sure that the name in the browser matches your ilogic code

     

    then you should be up and running!

    Inventor 2010 Certified Professional
    Please use plain text.
    Valued Contributor
    Posts: 68
    Registered: ‎03-23-2012

    Re: iLogic to switch between iAssembly Table Rows

    03-29-2012 05:47 AM in reply to: swordmaster

    1) I right clicked on both assembly table line-items (see picture previously posted) which are A60_RHR_Door_Assembly-01 and 02 and clicked 'Generate Files'

     

    2) I am confused by the REPLACE process.  What exactly am I replacing?  I clicked the REPLACE icon under ASSEMBLE and it won't let me pick the parent assembly name or either of the Table line-items below, it only lets me select the parts that make up the assembly.

     

    Maybe I am confused by sub-assembly and upper-level assembly.  Are the sub-assemblies the two different line items I created in the iAssembly table area, where I suppress certain parts that make up my assembly?

     

    My project only has one assembly, from what I understand (still relatively new to this).  It is made up only of single .ipt files combined together. 

    Please use plain text.
    Valued Mentor
    swordmaster
    Posts: 449
    Registered: ‎12-15-2008

    Re: iLogic to switch between iAssembly Table Rows

    03-29-2012 08:06 PM in reply to: nickv02

    Nick,

    Let me try to be a little clearer

     

    You have an assembly( this is the upper level assembly) into which you have placed a iassembly (this is the sub assembly)

    So anytime you place a assembly into another it is usual referred to as a sub assembly

     

    Do you remember that i mentioned that Inventor gets confused when you take a already placed assembly and convert it to a iassembly?

     

    To remove this confusion you have two options 1) use the replace function replace the sub assembly (your iassembly)  with itself .

    OR delete the iassembly from the upper level assembly then place it once more into your upper assembly. Remember that if you choose this option you will have to stabalize the name in the browser again

     

    Then you should be good.

     

     

    Inventor 2010 Certified Professional
    Please use plain text.