Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

How to call an Application Method from another Application Method

Please login with a confirmed email address before reporting spam

I have been trying to create one main application method that instantiates and runs other Application methods that I have written. But everytime I try to instantiate another Application Method it says it can't be found.

How do I instantiate an instance of the class defined in an application method, and then call the execute() funciton?

Example: I recorded and modified an application method called FEAworkflow that takes in a file name as a constructor argument, and then stores it as a member variable. The execute() function fot hat class reads that file, meshes it, and then applies a few loads, runs a simulation, and then stores the outputs in a CSV file.

Now I created wrote another application method in which I have a for-loop that itterates over a list of all file-names, and calls FEAworkflow with the new file-name as an argument.


0 Replies Last Post Aug 20, 2019, 3:01 p.m. EDT
COMSOL Moderator

Hello Systemtechniker

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.