Question about Dynamic Grid in Visio 2003 SDK

R

Rakesh Kumar

I am working on a .NET application that uses visio to display flow charts.
I tried to show the dynamic grids in my application but failed to do so. I
did the following.

Page.Document.SnapEnabled = true;
Page.Document.GlueEnabled = true;
Page.Document.DynamicGridEnabled = true;

Page.Document.GlueSettings = VisGlueSettings.visGlueToGuides |
VisGlueSettings.visGlueToConnectionPoints;

Page.Document.SnapSettings =
VisSnapSettings.visSnapToGrid | VisSnapSettings.visSnapToGeometry |
VisSnapSettings.visSnapToGuides | VisSnapSettings.visSnapToRulerSubdivisions |
VisSnapSettings.visSnapToConnectionPoints;

Am I doing something wrong or have I missed something?
 
P

Paul Herber

On Fri, 8 Jun 2007 06:05:01 -0700, Rakesh Kumar <Rakesh
I am working on a .NET application that uses visio to display flow charts.
I tried to show the dynamic grids in my application but failed to do so. I
did the following.

Page.Document.SnapEnabled = true;
Page.Document.GlueEnabled = true;
Page.Document.DynamicGridEnabled = true;

Page.Document.GlueSettings = VisGlueSettings.visGlueToGuides |
VisGlueSettings.visGlueToConnectionPoints;

Page.Document.SnapSettings =
VisSnapSettings.visSnapToGrid | VisSnapSettings.visSnapToGeometry |
VisSnapSettings.visSnapToGuides | VisSnapSettings.visSnapToRulerSubdivisions |
VisSnapSettings.visSnapToConnectionPoints;

Am I doing something wrong or have I missed something?

Have you set
Application.ActiveWindow.ShowGrid = True;
 
R

Rakesh Kumar

Thanks for your reply but it doesn't work.

Yeah, I have set the Application.ActiveWindow.ShowGrid = 1.
I have done the following for the visio application.

visioApp = axDrawingControl.Window.Application;

visioApp.ActiveWindow.ShowGrid = 1;

visioApp.UndoEnabled = false;

visioApp.Settings.DrawingAids = true;

visioApp.Settings.SmoothDrawing = true;

Next I have set the Page.Document properties.
Actually in my program I have opened a visio stencil and draged drop the
shapes from the stencil to the visio page. I want the Dynamic Grids to appear
while I drag drop the shapes but can't get them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top