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

Ability to control parameter visibility in Factory UI via iLogic (aka IsKey)

5 REPLIES 5
Reply
Message 1 of 6
olegd.prod
858 Views, 5 Replies

Ability to control parameter visibility in Factory UI via iLogic (aka IsKey)

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

5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: olegd.prod

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.

Message 3 of 6
liqinomickey
in reply to: Anonymous

Hi There,

I have attached one asset here. Please let me know if you have other questions.

Mickey

Autodesk Factory Team



Mickey Li
Product Manager
ACS Docs Platform feature team
Autodesk, Inc.

Message 4 of 6
olegd.prod
in reply to: olegd.prod

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

Message 5 of 6
Anonymous
in reply to: liqinomickey

 

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

Capture2.PNG

 

 

Capture.PNG

Could you help me with this problem?

Thank you in advance,

 

Willem

Message 6 of 6
liqinomickey
in reply to: Anonymous

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



Mickey Li
Product Manager
ACS Docs Platform feature team
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report