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?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (2)
Tom
el 12 de En. de 2015
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
0 comentarios
Luis
el 29 de Nov. de 2019
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 comentario
harika kurra
el 29 de Mayo de 2020
Hello Luis
Can you tell me how to get the position coordinates of the circle drawn in Visio
Thanks in advance
Ver también
Categorías
Más información sobre Database Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!