Error In Using Visio 2007 Drawing Control - Plz Help

A

Asif

Hi all,

I am working on MDI application that uses Visio 2003 Active X Drawing
control for Process Mapping developed in VB.NET and has been working
without any error since long time.

There are few issues that have been observed when the application is
upgraded with Visio 2007 Drawing Control (Visio 2007 Professional).

Application goes to non responding mode when files are open multiple
times. An exception is also occurred with the following message

{System.NullReferenceException}
[System.NullReferenceException]: {System.NullReferenceException}
HelpLink: Nothing
InnerException: Nothing
Message: "Object reference not set to an instance of an object."
Source: "Microsoft.Office.Interop.VisOcx"
TargetSite: {System.Reflection.RuntimeMethodInfo}

This error occurs at the line where drawing file name is assign to
control Src Property.

It is also happened when child/MDI form is closed and re-opens by
assigning file name to control.

Can any one help me to find the workaround of it as there is nothing
changes in existing code except replacement of Control with the latest
one?

Thanks a lot

Asif
 
A

Asif

Thanks but it did not work in my case.

One important thing is that Drawing Control object is initialized and
does not "Nothing" but when going to assign some value (File name) to
its source property it throws exception:

Run-time exception thrown: System.NullReferenceException - Object
reference not set to an instance of an object.

You might check this out

http://blogs.msdn.com/wmorein/default.aspx

al




I am working on MDI application that uses Visio 2003 Active X Drawing
control for Process Mapping developed in VB.NET and has been working
without any error since long time.
There are few issues that have been observed when the application is
upgraded with Visio 2007 Drawing Control (Visio 2007 Professional).
Application goes to non responding mode when files are open multiple
times. An exception is also occurred with the following message
{System.NullReferenceException}
[System.NullReferenceException]: {System.NullReferenceException}
HelpLink: Nothing
InnerException: Nothing
Message: "Object reference not set to an instance of an object."
Source: "Microsoft.Office.Interop.VisOcx"
TargetSite: {System.Reflection.RuntimeMethodInfo}
This error occurs at the line where drawing file name is assign to
control Src Property.
It is also happened when child/MDI form is closed and re-opens by
assigning file name to control.
Can any one help me to find the workaround of it as there is nothing
changes in existing code except replacement of Control with the latest
one?
Thanks a lot
Asif- Hide quoted text -

- Show quoted text -
 
A

Al Edlund

do you check to see if the file exists before attempting to assign it to the
control?
al

Asif said:
Thanks but it did not work in my case.

One important thing is that Drawing Control object is initialized and
does not "Nothing" but when going to assign some value (File name) to
its source property it throws exception:

Run-time exception thrown: System.NullReferenceException - Object
reference not set to an instance of an object.

You might check this out

http://blogs.msdn.com/wmorein/default.aspx

al




I am working on MDI application that uses Visio 2003 Active X Drawing
control for Process Mapping developed in VB.NET and has been working
without any error since long time.
There are few issues that have been observed when the application is
upgraded with Visio 2007 Drawing Control (Visio 2007 Professional).
Application goes to non responding mode when files are open multiple
times. An exception is also occurred with the following message
{System.NullReferenceException}
[System.NullReferenceException]: {System.NullReferenceException}
HelpLink: Nothing
InnerException: Nothing
Message: "Object reference not set to an instance of an object."
Source: "Microsoft.Office.Interop.VisOcx"
TargetSite: {System.Reflection.RuntimeMethodInfo}
This error occurs at the line where drawing file name is assign to
control Src Property.
It is also happened when child/MDI form is closed and re-opens by
assigning file name to control.
Can any one help me to find the workaround of it as there is nothing
changes in existing code except replacement of Control with the latest
one?
Thanks a lot
Asif- Hide quoted text -

- Show quoted text -
 
S

Senaj Lelic [DE MVP Visio]

usually this comes if the destination file is missing..

--
Mit freundlichen Grüßen/ with kind regards
Senaj Lelic
DE MVP Visio


Asif said:
Thanks but it did not work in my case.

One important thing is that Drawing Control object is initialized and
does not "Nothing" but when going to assign some value (File name) to
its source property it throws exception:

Run-time exception thrown: System.NullReferenceException - Object
reference not set to an instance of an object.

You might check this out

http://blogs.msdn.com/wmorein/default.aspx

al




I am working on MDI application that uses Visio 2003 Active X Drawing
control for Process Mapping developed in VB.NET and has been working
without any error since long time.
There are few issues that have been observed when the application is
upgraded with Visio 2007 Drawing Control (Visio 2007 Professional).
Application goes to non responding mode when files are open multiple
times. An exception is also occurred with the following message
{System.NullReferenceException}
[System.NullReferenceException]: {System.NullReferenceException}
HelpLink: Nothing
InnerException: Nothing
Message: "Object reference not set to an instance of an object."
Source: "Microsoft.Office.Interop.VisOcx"
TargetSite: {System.Reflection.RuntimeMethodInfo}
This error occurs at the line where drawing file name is assign to
control Src Property.
It is also happened when child/MDI form is closed and re-opens by
assigning file name to control.
Can any one help me to find the workaround of it as there is nothing
changes in existing code except replacement of Control with the latest
one?
Thanks a lot
Asif- Hide quoted text -

- Show quoted text -
 
D

David Parker

Possibly specifying the path incorrectly?

Senaj Lelic said:
usually this comes if the destination file is missing..

--
Mit freundlichen Grüßen/ with kind regards
Senaj Lelic
DE MVP Visio


Asif said:
Thanks but it did not work in my case.

One important thing is that Drawing Control object is initialized and
does not "Nothing" but when going to assign some value (File name) to
its source property it throws exception:

Run-time exception thrown: System.NullReferenceException - Object
reference not set to an instance of an object.

You might check this out

http://blogs.msdn.com/wmorein/default.aspx

al





Hi all,

I am working on MDI application that uses Visio 2003 Active X Drawing
control for Process Mapping developed in VB.NET and has been working
without any error since long time.

There are few issues that have been observed when the application is
upgraded with Visio 2007 Drawing Control (Visio 2007 Professional).

Application goes to non responding mode when files are open multiple
times. An exception is also occurred with the following message

{System.NullReferenceException}
[System.NullReferenceException]: {System.NullReferenceException}
HelpLink: Nothing
InnerException: Nothing
Message: "Object reference not set to an instance of an object."
Source: "Microsoft.Office.Interop.VisOcx"
TargetSite: {System.Reflection.RuntimeMethodInfo}

This error occurs at the line where drawing file name is assign to
control Src Property.

It is also happened when child/MDI form is closed and re-opens by
assigning file name to control.

Can any one help me to find the workaround of it as there is nothing
changes in existing code except replacement of Control with the latest
one?

Thanks a lot

Asif- Hide quoted text -

- Show quoted text -
 
A

Asif

Possibly specifying the path incorrectly?



usually this comes if the destination file is missing..
Asif said:
Thanks but it did not work in my case.
One important thing is that Drawing Control object is initialized and
does not "Nothing" but when going to assign some value (File name) to
its source property it throws exception:
Run-time exception thrown: System.NullReferenceException - Object
reference not set to an instance of an object.
You might check this out
http://blogs.msdn.com/wmorein/default.aspx
al

Hi all,
I am working on MDI application that uses Visio 2003 Active X Drawing
control for Process Mapping developed in VB.NET and has been working
without any error since long time.
There are few issues that have been observed when the application is
upgraded with Visio 2007 Drawing Control (Visio 2007 Professional).
Application goes to non responding mode when files are open multiple
times. An exception is also occurred with the following message
{System.NullReferenceException}
[System.NullReferenceException]: {System.NullReferenceException}
HelpLink: Nothing
InnerException: Nothing
Message: "Object reference not set to an instance of an object."
Source: "Microsoft.Office.Interop.VisOcx"
TargetSite: {System.Reflection.RuntimeMethodInfo}
This error occurs at the line where drawing file name is assign to
control Src Property.
It is also happened when child/MDI form is closed and re-opens by
assigning file name to control.
Can any one help me to find the workaround of it as there is nothing
changes in existing code except replacement of Control with the latest
one?
Thanks a lot
Asif- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -

Thanks all for reply. File is also exist and with correct name. The
strange thing is that if I check Control Src Property it shows empty
but once I try to assign some file name it throws exception. Normally
it does not happen in first time but after assigning file name to
control src property error occurs.

Is there some thing wrong in code that will goes to assign file name
to control source property before control is proper initialized or is
there any way to trace out the issue

Thanks a lot.
 

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