General Mechanical

General Mechanical

Topics relate to Mechanical Enterprise, Motion, Additive Print and more

Filter for Custom ACT Solver in Ansys Mechanical

    • Alberto Visentin
      Subscriber

      Hi! I'm implementing a custom ACT solver for the ACT extension I am developing in Ansys Mechanical during my Ph.D. My custom ACT solver connects to a Static Structural system (just like nCode DesignLife, see image below) and implements a custom analysis routine I developed.

      Up to now, I managed to implement my custom solver following the ACT extension example called 'DemonstrationSolver' I downloaded from Ansys website. Once I add the solver to an existing Static Structural analysis, everything works well and I have a new custom analysis on my Project Tree (as in the example for nCode DesignLife in the image below).
      However I couldn't manage to understand how to apply a filter on the options associated with my custom analysis and I didn't find any reference in the downloadable ACT examples. If you take nCode Design Life for instance (see below), once you right-click the 'nCode DesignLife' object, you find no options under 'Insert' except for 'Python Code', which means the nCode analysis has been filtered somehow. On the other hand, if I right-click my custom analysis, I still get all the default options of a Static Structural analysis under Insert. I would like to be able to filter and remove some of those buttons.

       

      Searching Ansys online XML Reference guide, I found the following XML tag which I think can be useful to implement the filtering I need since it allows to control the visibility of Mechanical buttons. However, I can't unerstand how the filter should be implemeted.

      I managed to add the same XML tag under the tag in my XML extension file and also created my custom 'ButtonVisibility.xml' control file following an example I found among Ansys default Add-ins. However nothing happens when I open Mechanical and load my extension, which means something must still be missing.

      Has anyone ever faced this problem? Do you have some advice for me?

      Thanks in advance for your time and help!

    • Aniket
      Forum Moderator

      Hi Alberto, Thanks I see that you have posted at https://discuss.ansys.com/discussion/2448/how-to-use-the-xml-tag-in-act-extension#latest, which is a good platform to discuss this question. This seems a bit tricky though, so thanks for patience in advance!

      -Aniket

      How to access Ansys help links

      Guidelines for Posting on Ansys Learning Forum

    • Alberto Visentin
      Subscriber

      Hi Aniket. Thank you for your interest on this!
      Yes, I decided to post the same question on the Ansys Developer forum which I didn't know about before yesterday to be honest. 
      I am still trying to understand how to make the filter work on my own but no success up to now. If you manage to find some more references about the XML tag and how to generate a callback to it, please share them with me if you are allowed.
      Yesterday I managed to access 'nCode DesignLife' XML file and I noticed they used the same tag in that extension, so there's clearly a way to do it, just haven't found out how.

    • mjmiddle
      Ansys Employee

       

      The filter was never fully documented for use by ACT extension writers. I see the LSDYNA extension that is installed with Ansys structural products has an actgui.xml inside which applies a filter. But copying the file to a user's extension and using the filter tag in the XML file doesn’t do any of the filtering as seen in the LSDYNA extension. I believe there needs to be a command to activate the filter once defined. That is why the filter is given a name, so multiple filters can be defined and turn on/off a will in the python script. I have tried to communicate with our scripting experts inside Ansys, but have not heard back yet.

       

    • Alberto Visentin
      Subscriber

      Hi mjmiddle. 
      I think you're right, indeed most ACT extensions installed by default with Ansys distributions (such as LS-DYNA or nCode DesignLife or Ansys Motion) have 'actgui.xml' or 'gui.xml' files designed to implement a filtering operation. All these files are coded using a tag. Sure I managed to copy one of those files and add it to my extension, but nothing happens by default once you load the extension, which surely means a Python callback to the filter is required in order to make it work. I'm still trying to figure this out but had no success until now.
      Do you happen to have news about this topic?

      Thnak you for your help.

    • mjmiddle
      Ansys Employee

      I don't think you should pursue this further. It will just waste your time. The extensions that use these filters all have their significant code compiled. I have never seen any documentation on how to use this filter, or any examples, or even talk about it. No one in the scripting group has replied to my inquiry and I don't expect them to. This is just something that was never fully implemented for the regular ACT extension developer.

Viewing 5 reply threads
  • The topic ‘Filter for Custom ACT Solver in Ansys Mechanical’ is closed to new replies.