i get an unexpected end of file at the line below that has databaseKeyValu e. Not sure why and how to fix it. Any help would be greatly appreciated.
Code:
private static bool addItemsToDrawing(
Visio.Page drawingPage)
{
bool itemsAdded = false;
// Add the shapes to the drawing page. The returned list contains
// the shape IDs of the added shapes.
Array shapeIDs;
addShapesToDrawing(drawingPage, out shapeIDs);
if (shapeIDs != null)
{
// Loop through each new shape, adding the shape to the map.
for (int index = shapeIDs.GetLowerBound(0);
index <= shapeIDs.GetUpperBound(0);
index++)
{
// Get the shape.
short shapeID = (short)(int)(shapeIDs.GetValue(index));
Visio.Shape newShape = drawingPage.Shapes.get_ItemFromID(shapeID);
// Add the shape to the map.
// This is needed to connect the shapes.
// The primary key in the database is used in the database
// connection table, so we need to save the mapping from
// this database key to the corresponding shape. The
// database key value was placed into each shape's Prop.ID
// value when the database-linked shapes were added to the
// drawing.
int databaseKeyValue = newShape.get_Cells(_VisioPropCellPrefix + _IDColumn).get_ResultInt((short)Visio.VisUnitCodes.visNumber, 0);
_ItemShapeIndexMap.Add(databaseKeyValue, newShape.Index);
}
itemsAdded = true;
}
return itemsAdded;
}
Comment