Unexpected end of file using get_cells method

  • Thread starter shailendrasingh823
  • Start date
S

shailendrasingh823

Hi There,

I am trying to drop shapes on page randomly & after connected
them.Please see this link which I am trying to follow.

http://msdn2.microsoft.com/en-us/library/aa722522.aspx
Here the code line

int databaseKeyValue =
newShape.get_Cells(_VisioPropCellPrefix +
_IDColumn).get_ResultInt((short)Visio.VisUnitCodes.visNumber, 0);

in addItemsToDrawing Function

I am getting Unexpected end of file error.

I have added method public static void ReadANamedCustomProperty(
Microsoft.Office.Interop.Visio.Shape customPropertyShape,
string cellName, bool isLocalName)

but it's showing me customPropertShape is null

Can anybody help me out for this.

Regards
Shail
 
J

JuneTheSecond

Would you plese check the real value of "(_VisioPropCellPrefix +
_IDColumn" in your running program ? Is this value is as same as any row
name of custom property in your shapesheet ? If not, it might reduce to
unexpected end of file.
 
S

shailendrasingh823

Would you plese check the real value of "(_VisioPropCellPrefix +
_IDColumn" in your running program ? Is this value is as same as any row
name of custom property in your shapesheet ? If not, it might reduce to
unexpected end of file.

Thanks for ur responce.

Can you try the same example if u can because today anpther new
message is coming ,"The Server threw an exception (Exception from
HResult:0X80010105(RPC_E_SERVERFAULT).It will not get much time just u
have to add Microsoft.Office.Interop.Visio Refference . & use the same
code.

When I try to get the array of shape IDs from the method

Array dataRowIDs = itemsRecordset.GetDataRowIDs(string.Empty); in
addShapesToDrawing function so it's giving me 1,2,3,4,5 But in Items
table ID has 2,3,4,5,6 just same like microsoft example.I think Some
problem is there .

if u can tell me how to read the DATARECORDSETS value,

Thanks
Shail
 
S

shailendrasingh823

Hi June the second ,


That Unexpected end of file error has been solved Thanks for ur help.

I am getting

The Server threw an exception (Exception from
HResult:0X80010105(RPC_E_SERVERFAULT) this exception when I am trying to execute the command for create explorer window.

drawingPage.Application.DoCmd(
(short)Visio.VisUICmds.visCmdDataExplorerWindow);
this is the line.

Thanks
Shail
 

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