Home > Net >  Visio drawing, after the enlarged or reduced to extreme page, draw the custom mold, shape error
Visio drawing, after the enlarged or reduced to extreme page, draw the custom mold, shape error

Time:11-16


` ` `. Microsoft Office. Interop. Visio. Document currentStencil=axDrawingControl1. Document. The Application. The Documents. The OpenEx (System. Windows. Forms. Application. StartupPath + "\ \ \ \ Visio mould. VSSX", (short) Microsoft. Office. Interop. Visio. VisOpenSaveArgs. VisOpenHidden);
//close the hidden "shape search" panel (very important)
Microsoft. Office. Interop. Visio. Window winShapeSearch=axDrawingControl1. Windows. Windows. Get_ItemFromID ((int) Microsoft. Office. Interop. Visio. VisWinTypes. VisWinIDShapeSearch);
WinShapeSearch. Close ();
Hashtable hashtableType=new Hashtable ();
HashtableType=ToolsUtil. GetModelDiagramNodeType (modelDiagramSetConfig);
String strMastersNodeType=(string) hashtableType (" 19 ");
Microsoft. Office. Interop. Visio. Shape Shape=currentPage. Drop (currentStencil. Masters [strMastersNodeType], dNodeWidth, dNodeHeight);
If (shape!=null & amp; & Shape. ID & gt; 0)
{
Shape. The Name=paramHashtable [r]. "NewLocalNodeID" ToString ();
Shape. Data2="19";
Shape. Data3="local activity node";
Shape. The Text=paramHashtable [r]. "NodeName" ToString () + "!!! ";
VisioApplication. ActiveWindow. Page. Shapes. ItemFromID (shape. ID). CellsSRC (VisSectionIndices visSectionCharacter, 0, VisCellIndices. VisCharacterColor). FormulaU="2";
}

` ` `



The following is an error:

CalloutTarget="(. Microsoft. Office Interop. Visio. ShapeClass) shape). CalloutTarget" triggered Exception type "Exception" System.Runtime.InteropServices.COM
Data1="(. Microsoft. Office Interop. Visio. ShapeClass) shape), Data1" triggered Exception type "Exception" System.Runtime.InteropServices.COM
,,,,,,,,,,
All these error, the whole shape
When running to Microsoft Office. Interop. Visio. Shape Shape=currentPage. Drop (currentStencil. Masters [strMastersNodeType], dNodeWidth, dNodeHeight); This sentence, shape and the properties of the method of inside
  •  Tags:  
  • C#
  • Related