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

    Autodesk Inventor

    Reply
    Active Contributor
    danzco
    Posts: 38
    Registered: ‎04-20-2011
    Accepted Solution

    iLogic material update bug

    429 Views, 8 Replies
    07-02-2012 09:15 AM

    Hello,

     

    I use the attached part template to create parts on a regular basis.  It has a small iLogic form built in to allow you to quickly enter the size, material, etc.

     

    My challenge is that the material drop down on the title bar does not update when the material is changed by iLogic.  This is true regardless of if the material is changed via the form or in the parameters window. 

     

    Material = Parameter("Material")
    If Material = "Aluminum" Then
    	iProperties.Material = "Aluminum-6061"
    ElseIf Material = "Ductile" Then
    	iProperties.Material = "Ductile Iron"
    End If

     

    The good news is that the material is actually being changed in the iProperties.  It's just a bit distressing that the new titlebar does not reflect the change.

     

    (Inventor 2012 w/ Update 1 on Windows 7 64-bit)

    Please use plain text.
    Employee
    Posts: 283
    Registered: ‎05-20-2008

    Re: iLogic material update bug

    07-04-2012 12:00 AM in reply to: danzco

    It looks that the material for the active document is not refreshed after using iLogic rule to change the material. But when you click the top node in browser after changing the material, it will be refreshed. So you could add the code lines below the existing code lines in the rule to accomplish this -

    Dim oNode As BrowserNode
    oNode = ThisApplication.ActiveDocument.BrowserPanes.ActivePane.TopNode

    oNode.DoSelect

     

    Thanks,
    River

    Thanks,
    River Cai

    Quality Assurance Team
    Autodesk, Inc.
    Please use plain text.
    Active Contributor
    danzco
    Posts: 38
    Registered: ‎04-20-2011

    Re: iLogic material update bug

    07-05-2012 08:35 AM in reply to: Yijiang.Cai

    Thank you for the code; that did the trick.

     

    I also received an example file from Curtis_Waguespack that was helpful. One common denominator I found with both of the solutions is that when changing the material via the iLogic form everything works as expected.  When the parameter is modified directly in the paramters window though it still fails to update the titlebar, although iProperties.Material does get changed correctly.

    Please use plain text.
    Member
    Posts: 4
    Registered: ‎10-16-2012

    Re: iLogic material update bug

    11-15-2012 02:11 PM in reply to: danzco

    I'm still struggling to make this work. Is there something I'm missing with the add in code you suggested, River?

    Dim oNode As BrowserNode oNode = ThisApplication.ActiveDocument.BrowserPanes.ActivePane.TopNode

    oNode.DoSelect

    I got error messages I don't know how to solve when I tried it.

    Also, and this is the big question, how do I link Appearances to Materials? I'm working on Wooden parts and the appearance is very important.

    Please use plain text.
    Employee
    Posts: 283
    Registered: ‎05-20-2008

    Re: iLogic material update bug

    11-15-2012 07:39 PM in reply to: danzco

    Please see the attached model.

     

    Before you use the iLogic form to customize the model, please clear the appearance overriden using clear command near the appearance drop-down list. And it should work fine when using iLogic form to customzie the model, and the appearance will be linked with material too.

    Thanks,
    River Cai

    Quality Assurance Team
    Autodesk, Inc.
    Please use plain text.
    Member
    Posts: 4
    Registered: ‎10-16-2012

    Re: iLogic material update bug

    11-16-2012 07:29 AM in reply to: Yijiang.Cai

    Thanks, I got it working for Materials. I'm not finding that the Appearances are linked to the Materials though, even though they're both reading from Autodesk Libraries with overrides cleared.

    I still need to find a way to customise the Appearances with an iLogic form somehow. It has to work on large assemblies with multiple materials in them, all linked with ilogic. There has to be a way to do that.

    Please use plain text.
    Member
    Posts: 4
    Registered: ‎10-16-2012

    Re: iLogic material update bug

    11-26-2012 09:48 AM in reply to: Bwest44

    I got this working, thanks to the above advice. The Gods of neverending programming are well happy! It means adding the same parameters and rules to every single piece as far as I can figure it.

    Any simpler suggestions?

    Please use plain text.
    Employee
    Posts: 283
    Registered: ‎05-20-2008

    Re: iLogic material update bug

    11-26-2012 10:49 PM in reply to: danzco

    For the legacy files, you have to update the iLogic rule manually one by one. For the new files, maybe you could consider to create one template using the updated iLogic rule.

    Thanks,
    River Cai

    Quality Assurance Team
    Autodesk, Inc.
    Please use plain text.
    Member
    Posts: 4
    Registered: ‎10-16-2012

    Re: iLogic material update bug

    11-27-2012 05:51 AM in reply to: danzco
    I'll do that, thanks. I usually use pieces that are set up with the parameters I need anyway. Best regards, Bill West. Mobile: (914) 357-1729 Home: (914) 738-9047 E-mail: wg.west@earthlink.net 7 Priory Lane Pelham Manor NY 10803
    Please use plain text.