Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic material update bug

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
danzco
1570 Views, 8 Replies

iLogic material update bug

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)

8 REPLIES 8
Message 2 of 9
Yijiang.Cai
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

Inventor Quality Assurance Team
Autodesk, Inc.
Email: River-Yijiang.Cai@autodesk.com
Message 3 of 9
danzco
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.

Message 4 of 9
Bwest44
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.

Message 5 of 9
Yijiang.Cai
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

Inventor Quality Assurance Team
Autodesk, Inc.
Email: River-Yijiang.Cai@autodesk.com
Message 6 of 9
Bwest44
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.

Message 7 of 9
Bwest44
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?

Message 8 of 9
Yijiang.Cai
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

Inventor Quality Assurance Team
Autodesk, Inc.
Email: River-Yijiang.Cai@autodesk.com
Message 9 of 9
Bwest44
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums