Inventor General Discussion

Inventor General Discussion

Reply
Contributor
EdwardRose
Posts: 11
Registered: ‎04-19-2011
Message 1 of 4 (170 Views)

Material pull down not updating after iLogic routine

170 Views, 3 Replies
09-25-2013 12:59 PM

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

*Expert Elite*
cbenner
Posts: 3,276
Registered: ‎04-06-2010
Message 2 of 4 (166 Views)

Re: Material pull down not updating after iLogic routine

09-25-2013 01:18 PM in reply to: EdwardRose

I suggest putting this in the Inventor Customization forum, a lot more ilogic gurus running around in there.

 

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120

ChrisB

ADSK_Expert_Elite_Icon_S_Color_Blk.png

Please use Mark Solutions!.Accept as Solution &Give Kudos!Kudos to further enhance the value of these forums. Thank you! :smileyhappy:

http://cbennertipstricks.blogspot.com/


   

Contributor
EdwardRose
Posts: 11
Registered: ‎04-19-2011
Message 3 of 4 (158 Views)

Re: Material pull down not updating after iLogic routine

09-25-2013 01:41 PM in reply to: cbenner

Thanks.

 

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

*Expert Elite*
mrattray
Posts: 2,501
Registered: ‎09-13-2011
Message 4 of 4 (143 Views)

Re: Material pull down not updating after iLogic routine

09-25-2013 05:35 PM 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

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.