Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Error when using API command

Please login with a confirmed email address before reporting spam

Hi everyone,

we have a computer, recently upgraded from 4.0a -> 4.1 , where we have a strange problem:

When using some API command (under Matlab) there are systematically error occuring.

When we are running a .m file exported via 4.0a, there is no error in execution.
The same model's .m file exported via 4.1.0.185 -> error occur.


Here is an example:
________________
[...]
model.geom('geom1').feature.create('blk1', 'Block');
model.geom('geom1').runAll;
model.geom('geom1').edgeParamRange(5)
__________________

Here, the error will occur at the last command, returning the following:

__________________
??? Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Illegal input edge number X#5
Messages:
Illegal input edge number X#5

Stack trace:
at com.comsol.model.impl.GeomInfoBaseImpl.b(Unknown Source)
at com.comsol.model.impl.GeomContainerImpl.d(Unknown Source)
at com.comsol.model.impl.GeomContainerImpl.edgeParamRange(Unknown Source)
___________________


This desktop is running with MatLab 2008b.



2 Replies Last Post May 4, 2011, 9:59 a.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 2, 2011, 4:04 p.m. EDT
Hi

even if you will not like it, my advise is to redo everything in afresh new v4.1 and not try the direct translation. There are a few variable names that have changed (from my understanding), when you import the fle, these might remain in the "old naming", this is difficult to identify, then you can miss items, or forget some contributions

Another permanant issue is the version matching versions between programmes that are talking to each other via dll or other I/F means, be it CAD, COMSOL, Matlab or even Office and OS.
I always try to keep a logical level between these programmes (which costs me a lot in cash and is difficult to justify for the ROI, but gains me time with error and compatibility issues, while losses my time lerning the subtile changes that the programmers mean are usefull between the versions (a delicat balance to perform)

Sorry I do not have any better advice :(

--
Good luck
Ivar
Hi even if you will not like it, my advise is to redo everything in afresh new v4.1 and not try the direct translation. There are a few variable names that have changed (from my understanding), when you import the fle, these might remain in the "old naming", this is difficult to identify, then you can miss items, or forget some contributions Another permanant issue is the version matching versions between programmes that are talking to each other via dll or other I/F means, be it CAD, COMSOL, Matlab or even Office and OS. I always try to keep a logical level between these programmes (which costs me a lot in cash and is difficult to justify for the ROI, but gains me time with error and compatibility issues, while losses my time lerning the subtile changes that the programmers mean are usefull between the versions (a delicat balance to perform) Sorry I do not have any better advice :( -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 4, 2011, 9:59 a.m. EDT
Thank you Ivar,

I'll try do redo it ... :|


Have a nice day,
Thank you Ivar, I'll try do redo it ... :| Have a nice day,

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.