COMSOL - M-file with unnecessary entries

  • Thread starter Thread starter DJ_GoodNews
  • Start date Start date
  • Tags Tags
    Comsol
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 6K views
DJ_GoodNews
Messages
5
Reaction score
0
Hello everybody!

I have the problem that my comsol generated m-files contain a lot of repeating entries and old values which have been changed in the process of creating the *.mph-file.

Comsol writes in the knowledge base:
"When saving a model as an M-file it contains by default all the command history. This makes the file dense and not easy to work with. Using the reset option under the file menu makes the script clear as it only keeps the commands that correspond to the current model."

I am already doing it like this, I am using the reset model option, but still the m-file is unstructured because of unnecessary entries.

How can one get rid of these? Thanks!


DJ_Goodnews.
 
Physics news on Phys.org
Hi,

(..."Using the reset option under the file menu makes the script clear as it only keeps the commands that correspond to the current model." ..)

I got an message from the Comsol support. They state, that the "reset option" does not clear the complete history.

Since I got no answers so far, Iwoulde be interested if anyone has the same problem?

And how people in general you work with the skript.
-Do you start from scratch? Or convert a mph. to an m-file ? ...
-Any suggestions, how to get along with the script?

Cheers,
DJ_GoodNews
 
Yeah, the reset is what it is in terms of cleaning the m - file. Haven't come up with any other way than to mix text editors with highlighting and scripting to script m - files (i.e. generate m - files using python/perl so don't have to repeat everything every time or resort to too much copy - pasting). So essentially from scratch.