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: 

Material pull down not updating after iLogic routine

3 REPLIES 3
Reply
Message 1 of 4
EdwardRose
331 Views, 3 Replies

Material pull down not updating after iLogic routine

The following rule works perfectly as an external rule except the Materiial and Appearnace pull downs do not update. I know I am missing something easy. Anyone have any ideas?

 

Here is my code

 

'Set the materials libraryassetLib = ThisApplication.AssetLibraries("iLogicTestMatLib")

'Set the current document activeoMyParameter=ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters

'Turn off error reporting on parameters and assign MATLIST to paramtest'If MATLIST does not exist then paramtest will have Nothing as a valueParameter.Quiet = True
 paramtest = Parameter.Param("MATLIST") 

'Test to see if MATLIST exists and if it does not exist then create itIf Parameter.Param("MATLIST") Is Nothing Then 
oMyParameter.AddByValue("MATLIST", "Generic", UnitsTypeEnum.kTextUnits)
End If
 MultiValue.UpdateAfterChange = True

'Re-assign the list of materials from the defined material library to the multivalue list'This assures that if there have been additions to the materials list the most current list'is what will be available in the pull down.MultiValue.List("MATLIST") = iProperties.Materials

iLogicForm.ShowGlobal("Material", FormMode.Modal)

iProperties.Material = Parameter("MATLIST")
iLogicVb.UpdateWhenDone = True

Thanks in advance to whoever can help me

3 REPLIES 3
Message 3 of 4
EdwardRose
in reply to: cbenner

Thanks.

 

I thought I was posting it there and had not realized I was in the wrong group

Message 4 of 4
mrattray
in reply to: EdwardRose

I didn't check the customization group to see if you posted there, but I've hit this problem myself.
I found that selecting the top node of the browser updates the material drop down (don't ask me why). You can add into your rule a bit of code to automatically select the top node which will "trick" Inventor and make it update. I don't have a snippet handy now because I'm not in front of my work station, but give it a crack.
Post back here if you can't figure it out and I'll post the snippet when I can.
Mike (not Matt) Rattray

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

Post to forums  

Autodesk Design & Make Report