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 insert the component to app model on COMSOL APP

Please login with a confirmed email address before reporting spam

I want to insert the component to defalt app model on app. I tried followings.

import com.comsol.model.util.;

  • String[][] ap=getModel("app_mtag").component().insert(mphPath, new String[]{"comp1"}, new String[]{});
  • String[][] bd=getModel("builder_mtag").component().insert(mphPath, new String[]{"comp1"}, new String[]{});
  • String[][] cr=getModel("created_mtag").component().insert(mphPath, new String[]{"comp1"}, new String[]{});

mphPath is String file path. "app_mtag" is tag of default application builder's model. "builder_mtag" is tag of model builder's model. "created_mtag" is tag of created model in app using ModelUtil.create("createdtag");.

2nd and last code work well, but 1st one doesn't work and retrun errors. Does anyone know how to run this correctly ?


0 Replies Last Post Jan 31, 2022, 10:47 p.m. EST
COMSOL Moderator

Hello hisanori aizawa

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.