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.

Display some different results in the same graphic in Application Builder

Please login with a confirmed email address before reporting spam

Dear I want to make some different results displayed in one graohic in Application Builder,just like the enclosure shows,yesterday i got it,but i don't know why?or! it's just comsol's bug?



1 Reply Last Post Nov 27, 2019, 9:20 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Nov 27, 2019, 9:20 a.m. EST
Updated: 5 years ago Nov 27, 2019, 9:34 a.m. EST

You can use the following code in a local method for the button:

useGraphics(model.result("pg2"), "frmRes/gfxLine");

instead of pg2 use the appropriate plot name for the desired plot in your application.

The frmRes/gfxLine bit tells the application to use the graphics item called gfxLine on the form named frmRes.

It looks like your graphics are on the same form as the plot buttons, so you shouldn't need the frmRes/ bit.

Each button can use similar code, pointing towards the same graphics object.

You can use the following code in a local method for the button: ***useGraphics(model.result("pg2"), "frmRes/gfxLine");*** instead of ***pg2*** use the appropriate plot name for the desired plot in your application. The ***frmRes/gfxLine*** bit tells the application to use the graphics item called ***gfxLine*** on the form named ***frmRes***. It looks like your graphics are on the same form as the plot buttons, so you shouldn't need the ***frmRes/*** bit. Each button can use similar code, pointing towards the same graphics object.

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.