フィルターのクリア

I am working with MATLAB to start Visio 2010. Then I want to put some different Shapes in a new Document from my own Stencil. But how can I add my own Stencil to the new Visio file and how do I add some Shapes to the new Document?

4 ビュー (過去 30 日間)
At the moment I only can start Visio 2010, I can make a new file, then I can save it. But I can not add the stencil from Matlab. I can add the Stencil to the general stencils in Visio without mablab, but maybe I can add it also from Mablab. I tried it with StencilPaths but it didnt work. Also I want to know how I can add new shapes to the document.
Here my first code:
visio = actxserver('Visio.Application');
%visio.ActiveDocument;
visio.Documents.Add('');
visio.Documents.Item(1).SaveAs([cd '\' 'Filename.vsd'])
I would be glad if someone can help me, or if someone can link me a site where I can find some hints to work from Matlab with Visio.
Cheers Max

回答 (2 件)

Tom
Tom 2015 年 1 月 12 日
Hey Max,
I'm trying to do the same. I see that you wrote this about 2 years ago. Do you have any results yet?
Best regards,
Tom

Luis
Luis 2019 年 11 月 29 日
You can use the invoke() or get() functions to access the stencil. Here a little example on how to drop a circle shape:
appVisio = actxserver('Visio.Application');
appVisio.Visible =1;
doc = appVisio.Documents.Add("Basic Diagram.vst");
pagObj = doc.Pages.Item(1);
% invoke() and get() produce the same result in this case
% stnObj=invoke(appVisio,'Documents','Basic Shapes.vss');
stnObj=get(appVisio,'Documents','Basic Shapes.vss');
mast_circ = get(stnObj,'Masters','Circle');
pagObj.Drop(mast_circ, 5,5);
  1 件のコメント
harika kurra
harika kurra 2020 年 5 月 29 日
Hello Luis
Can you tell me how to get the position coordinates of the circle drawn in Visio
Thanks in advance

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by