Hiding automatic properties "Definition" and "Result" from a result object

Options
Nick Ramseyer
Nick Ramseyer Member Posts: 18
First Comment

I am currently writing an ACT result extension that uses a result object in the tree. By default a result object comes with the "Definition" and "Results" properties shown to the user.

Is there a way to hide these properties so the user cannot modify them? So far investigating the object these properties do not appear easily accessible.

For clarity I am looking to hide these properties as I do not want the user to be able to swap to "Minimum Over Time" or any of the other options for definition (I'd like to only have the object work in its default "Time" option).

Tagged:

Answers

  • Chris Harrold
    Chris Harrold Member, Administrator, Employee Posts: 117
    First Answer First Comment First Anniversary Ansys Employee
    admin
    Options

    @AKD-Scripting-Team - can someone offer some guidance here?

  • Abel Ramos
    Abel Ramos Member, Employee Posts: 30
    5 Likes First Answer First Comment First Anniversary
    Options

    Hello,

    You should be able to add the tag: readonly="true" in the XML of the property

    Best Regards,

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 409
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Options

    @Nick Ramseyer I ran into the same issue some time back and couldn't find any way to hide the default ones. Would Python Result work as a substitute for ACT result object in your case? There you can define and control all the properties by your code.

  • Nick Ramseyer
    Nick Ramseyer Member Posts: 18
    First Comment
    Options

    Hey Ayush! Unfortunately, Python Results are not an option as the primary business value we are adding is to create extensions that are Revision Controlled and Compiled using ACT. Most of our users are not python experts or APDL experts, so having them use Python Results is too intimidating and has too high of a barrier to entry for new users without extensive training. By using ACT we can create the extensions with the GUI elements necessary to deploy our custom scripts while keeping the barrier to entry low.

    Essentially the easier it is for us to manipulate ACT objects, the more business value we can drive through deployment and the less user errors through Revision Control.

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 208
    First Answer First Comment 5 Likes First Anniversary
    Options

    It has been a while, but I think there is a hack to hide the default inputs. I believe you determine the internal name of the properties, redefine them in xml, and set visible='False'. Or maybe set visible='False' in a callback, such as onAdd.