currentPage.DropManyLinkedU is not working with drawing control in Win forms

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Hi I am trying to make a application which should generate a automatic
shapes according to available external data. I a passing a drawing
control with the file name in Generate drawing function & then taking
the application & adding vst file.

internal static void
GenerateDrawing(AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl
drawingcontrol,
string fileName)
{
// Open a document.
//Visio.Document newDocument =
setUpDocument(visioApplication);
/////////////Open A Templete of stensils////////////
Visio.Document newDocument = null;
// newDocument = setUpDocument();

newDocument = setUpDocument(drawingcontrol);


//Visio.Application Visioapplication =
drawingcontrol.Window.Application;
//newDocument =
Visioapplication.Documents.OpenEx(Application.StartupPath + "\\" +
_VisioTemplateName,
// (short)Visio.VisOpenSaveArgs.visOpenCopy);

if (newDocument != null)
{
// Link the database information to the document's
// DataRecordset collection.
if ((readData(newDocument, fileName)) &&
(columnsExist(newDocument)))
{
// Create the Visio drawing.& before that empty
hashtable exists data
_ItemShapeIndexMap.Clear();
buildVisioDrawing(newDocument);
}
}
}

private static Visio.Document
setUpDocument(AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl
drawingcontrol)
{
Visio.Document newDocument = null;

try
{
// Open Visio.
// Visio.Application visioApplication = new
Visio.Application();
//string applicationName = visioApplication.Name;
// Open a new document based on the template.
Visio.Application visioApplication =
drawingcontrol.Window.Application;
newDocument = visioApplication.Documents.OpenEx(
Application.StartupPath + "\\" +
_VisioTemplateName,
(short)Visio.VisOpenSaveArgs.visOpenCopy);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

return newDocument;
}

Every where it's giving me correct values but finnaly nothing coming
in Drawing control.

Thanks
Shail

.



Relevant Pages

  • Re: currentPage.DropManyLinkedU is not working with drawing control in
    ... drawingcontrol.Src = string DrawingNameWith Path ... shapes according to available external data. ... I a passing a drawing ... Visio.Document newDocument = null; ...
    (microsoft.public.visio.developer)
  • RE: currentPage.DropManyLinkedU is not working with drawing control in
    ... Would you try src property to set up drawing for Drawing Control. ... drawingcontrol.Src = string DrawingNameWith Path ... Visio.Document newDocument = null; ...
    (microsoft.public.visio.developer)
  • Re: currentPage.DropManyLinkedU is not working with drawing control in
    ... shapes according to available external data. ... I a passing a drawing ... Visio.Document newDocument = null; ... connector only to connect my shapes.I want ...
    (microsoft.public.visio.developer)
  • Re: Graphics ... almost working ... missing one line?
    ... Even after you ran into problems with the wrong design, admitted it was because of the wrong design, and were provided additional details on how to do it right, you insisted on doing it wrong. ... where does your drawing code go? ... let the control itself deal with a variety of display issues. ... invalidate the control in reaction to changes to data. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: clear fillEllipse graphics
    ... where does your drawing code go? ... It's a convenient control to which you can attach an existing Image, and let the control itself deal with a variety of display issues. ... You _could_ certainly derive a new class from PictureBox and override the OnPaintmethod, but that would be sort of pointless. ... Providing good advice on design generally requires a lot of background knowledge of the problem being solved, and not only is that background knowledge difficult to express in this context, so too is explaining how a good design would work. ...
    (microsoft.public.dotnet.languages.csharp)