In pre-2017 software this could be done by manipulating the parameter.IsKey value in iLogic. This functionality changed in 2017, and IsKey no longer worked as means of controlling visibility.
Well, it is back!
Now you are able to control parameter visibility in FDU 2019.1. We were not able to continue using IsKey for this purpose, so had to come up with a different way. Parameter visibility in the Factory UI can be controlled by the presence of a "magic string" in the parameter.Comment. Specifically, if we find the string ADSKFactoryHideInUI in the parameter.Comment, that parameter will not be shown in the Factory UI.
Details
1. when publishing your assets, turn IsKey ON for all parameters that may ever need to be visible
2. in your iLogic code that is manipulating parameter.IsKey, use the same boolean value to control ADSKFactoryHideInUI - see a sample routine below
Sub SetFactoryParameterVisibility(ByVal ParameterName As String, ByVal IsVisible As Boolean)
Const HIDE_IN_UI_TAG As String = "ADSKFactoryHideInUI"
Dim param = Parameter.Param(ParameterName)
param.Comment = param.Comment.Replace(HIDE_IN_UI_TAG, String.Empty)
If (IsVisible = True) Then
'visible, so no need to add the tag
Else
param.Comment += HIDE_IN_UI_TAG
End If
End Sub
Let us know if you have any questions
Oleg
First, it is nice that there is a way to apply the "iskey" function in Inventor 2019.
Unfortunately I do not get the code working in my asset.
Can you give a simple example where you appley this piece of code?
Thank you in advance.
Hi There,
I have attached one asset here. Please let me know if you have other questions.
Mickey
Autodesk Factory Team
in addition to including this in FDU 2019.1, we've now released an FDU 2018 hotfix (2018.1.2) that includes these iLogic-related changes
Hi MickeyLi,
First, thank you for sending me an example with the code.
He didn't give me errors anymore by running the rule , nice.
But the parameter is still visible when parameter Length=2000mm in the Factory layout....
The Width parameter set automaticly to 1500 mm
Could you help me with this problem?
Thank you in advance,
Willem
Hi Willem,
Do you have FDU 2019.1 installed?
I did give a iLogic code of setting width to be 1500 when length is 2000.
I can see the comment is added to width, it should hide the parameter in Factory Properties palette.
Mickey
Can't find what you're looking for? Ask the community or share your knowledge.