C# User Interface Properties / Error while importing Image as resource

C# User Interface Properties / Error while importing Image as resource

Anonymous
Not applicable
4,350 Views
7 Replies
Message 1 of 8

C# User Interface Properties / Error while importing Image as resource

Anonymous
Not applicable

Hello ,

 

I am coding a UserInterface for our ETO Autodesk CAD Software. This is done as a simple add on in C#. Effectively its a class Library DLL placed under a certain path.

Now at the point I need to show images in the user Interface I get this message:

 

The argument docData must implement the interface IVsTextStream.

 

The code is not saving anymore and eventually the complete windows form is suddenly empty.

I try to use pictureBox or add the image directly on the tab of a tabcontrol.

I used different file formats like png or bmp. Always the same Error.

 

Hope someone can help. Internet does not show anything.

Thank you Regards Timo

Reply
Reply
0 Likes
Accepted solutions (1)
4,351 Views
7 Replies
Replies (7)
Message 2 of 8

mstrater
Alumni
Alumni

I'm not very familar with this process, but the error you are getting implies that something isn't fully implementing this interface: https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.textmanager.interop.ivstextstream.as...

Can you provide the code context where this is occurring?

Thanks,

Max



Max Strater
Sr. Software Engineer
Reply
Reply
0 Likes
Message 3 of 8

Anonymous
Not applicable

Thank you Max for your answer,

 

It is not that the error appears due to code I added.

It is appearing as soon as I try to implement / link / import a Image in a picture box.

 

Find attached a short video.

 

Thank you / Regards

Timo

 

PS: The Warnings are also attached as WordFile. I am not responsable for this warnings they ever been there since

we received the template c# strukture to develop the UI.

Reply
Reply
0 Likes
Message 4 of 8

MjDeck
Autodesk
Autodesk

Hi Timo,

 The problem might be caused by the ETO Studio extension in Visual Studio. To verify this, you can temporarily remove the extension.
You're running Visual Studio 2012, right? If so:
- shut down Visual Studio
- open Windows Explorer and navigate to the directory:
  C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Autodesk
- copy the subfolder named ETOSeriesStudio to a backup location (of your choosing)
- open a command prompt and cd to the directory:
  C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
- run the command:
  devenv /Setup

That command may take a while to run. When it's done, restart Visual Studio and try your steps again. If the problem goes away, you should be able to work in your project and we will look at the error in more detail.

 


Mike Deck
Software Developer
Autodesk, Inc.

Reply
Reply
0 Likes
Message 5 of 8

Anonymous
Not applicable

Hello Mike,

 

THank you for your approach. I did the steps first in VS 11 Folder, backuped before and tryied to import image in the Picture box-- same Error,

Then I did the devenv Setup command in VS 12 Folder , No success.

 

I then not only backuped the Folder but deleted it from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Autodesk.

 

I repeaded both --> Devenv in folder VS 11 and then in Folder VS 12. The program was running but nothing changed. The cut folder is not comming back and the Error in VS 2013 (12) is the same.

 

Thank you / Regards

Maybe there is something else we can do ?

 

Timo

Reply
Reply
0 Likes
Message 6 of 8

MjDeck
Autodesk
Autodesk

Hi Timo,

I forgot: deleting the ETOSeriesStudio folder is a very important step in this workaround!

Here's revised steps for VS 2012:
- shut down Visual Studio
- open Windows Explorer and navigate to the directory:
  C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Autodesk
- copy the subfolder named ETOSeriesStudio to a backup location (of your choosing)
- delete the subfolder named ETOSeriesStudio
- open a command prompt and cd to the directory:
  C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
- run the command:
  devenv /Setup

 

For VS 2013, substitute 12.0 for 11.0:
- shut down Visual Studio
- open Windows Explorer and navigate to the directory:
  C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Autodesk
- copy the subfolder named ETOSeriesStudio to a backup location (of your choosing)
- delete the subfolder named ETOSeriesStudio
- open a command prompt and cd to the directory:
  C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
- run the command:
  devenv /Setup 

 


Mike Deck
Software Developer
Autodesk, Inc.

Reply
Reply
0 Likes
Message 7 of 8

Anonymous
Not applicable

Thank you Mike,

 

unfortunatly in VS12 there is no folder from Autodesk and nothing called ETOSeriesStudio.

Only within VS 11 there was this folder. So I deleted this and performed the devenve / Setup command.

 

The command was running and no Error occured but there is no new folder and still I can not import

image in Picture box .

2016-01-27 09_13_19-Extensions.png

Thank you / Regards

Timo

Reply
Reply
0 Likes
Message 8 of 8

Anonymous
Not applicable
Accepted solution

Hello Timo,

 

A colleague found that deleting ParametersForm.resx from the

project causes the problem to go away. (attached a screenshot)

 

 

Reply
Reply
0 Likes