Can I nest the function pptpop() in appdesigner and compile it?
2 次查看(过去 30 天)
显示 更早的评论
farzad
2020-5-9
Hi All
I want my compiled app, write outputs , images to powerpoint, and I used the pptpop function in my app that I am gonna compile, but it gives :
Error: Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer.
19 个评论
farzad
2020-5-9
should I do something like this , to add the population slide.mlx file path to my code ?
properties (Access = private)
oldpath = addpath('./icons')
end
Ameer Hamza
2020-5-9
Which line gives this error?
Error: Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer.
farzad
2020-5-9
I attached you the mfile. do you have this file in your matlab documentation directory. you can find printPlot in it. I don't know how it works. if you run pptpop() in workspace, it works. but if you run the printPlot alone, matlab does not know it
Ameer Hamza
2020-5-9
I don't have this file installed with my MATLAB. But if I run your file. It works without error.
farzad
2020-5-9
编辑:farzad
2020-5-9
Yes, but did you nest the function into an app and run it ?
and what do you mean by working ? does it create the powerpoint file ? Because if it runs it means you don't need MATLAB report generator to create that. you should also have this file I belive. cause it calls an .mlx file that if it did not exist in your documentation directory, it would have buged with error
Ameer Hamza
2020-5-9
Yes, I can run this in the app, and it generates a PowerPoint file (attached). However, It needs to open separate figures to run the function. It does not draw the graphs on the uifigure of the app designer.
farzad
2020-5-9
I don't want it draw the graphs on th uifigure, I just wanted the powerpoint file be created. so : how come it's working from the app for you and not for mine ? how do you do that ?
Ameer Hamza
2020-5-9
I just put the line
pptpop()
in the startupFcn of the uifigure. Whenever I open the app, it runs the function and creates a ppt file in the same folder.
Note: I am using R2020a on macOS and haven't compiled the app.
farzad
2020-5-10
I don't think that this is a version issue. I hope not, so you get the completed powerpoint file, not just the file. I mean, the images are printed inside the ppt file ?
It will be very disappointing why on mine it's not working
farzad
2020-5-10
so why is it giving me this error. I think it'salso irrelevant to matlab report generator toolbox
farzad
2020-5-10
I moved the pptpop to a new button, this time the figure pops up and the empty powerpoint is created but still I havethe error
Error using print (line 80)
Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer.
Error in pptpop>printPlot (line 183)
print(imgtype, imgname);
Error in pptpop (line 67)
img = printPlot('plot1');
Ameer Hamza
2020-5-10
farzad, See the attached file. If these seem like the PowerPoint file, you want?
采纳的回答
Walter Roberson
2020-5-10
R2020a and later:
change line 183,
print(imgtype, imgname);
to
exportgraphics(gcf, imgname)
7 个评论
Walter Roberson
2020-5-10
I believe it will work after compiling.
Leave line 67 as-is. You are modifying what printPlot() does.
exportgraphics is a replacement for print() and saveas()
Walter Roberson
2020-5-10
No, in R2019b there is no known way to get a copy of uifigure() as an image -- other than possibly invoking a system-level screen capture function some-how, such as an ActiveX control.
farzad
2020-5-11
Dear Walter, this question of mine is suffering from lack of views, I got a problem :
Walter Roberson
2020-5-12
I do not have Report Generator; also I am executing on Mac, which cannot talk to PowerPoint .
farzad
2020-5-12
The Mac news are very sad. at least I had put the .m file script so someone could have tried that on their PC
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Report Generator 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)