.NET

Reply
Valued Mentor
360 Posts
29 Kudos
Registered: ‎05-23-2005
Post 1 of 3
Accepted Solution

Problem to create a palette

154 Views, 2 Replies
04-13-2014 11:01 AM

Hello,

 

I'm a newbie in vb.net and ACAD and I'm trying to follow this Autodesk tutorial https://forums.autodesk.com/autodesk/attachments/autodesk/152/26712/1/CP205-2_Mike_Tuersley.pdf to create a palette with ACAD2015/Visual Studio 2013/Win 8.1 but an error occures at the begining of the snippet :

Dim ps As Autodesk.AutoCAD.Windows.PaletteSet = Nothing
ps = New Autodesk.AutoCAD.Windows.Palette("My First Palette")

 These two lines are underlined and I get this error message :

Erreur    8    Une référence à l'assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' contenant l'interface implémentée 'System.Windows.Interop.IWin32Window' est requise. Ajoutez-en une à votre projet.

In english it gives something like this :
Error 8 : A reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'  containing the implemented interface 'System.Windows.Interop.IWin32Window' is required. Add it to your project.

OK, I can add a reference, but which one ? What I'm doing wrong ?

 

Thank you.

Hi,

 

As it is written, you should add a reference to the PresentationCore assembly.
Right-click the project in the Solution Explorer > Add > Reference... > Assemblies > check PresentationCore > OK

 

 

Salut,

 

Comme il est écrit, il faut que tu ajoutes une référence à l'assembly PresentationCore.

Clic droit sur le projet dans l'explorateur de solutions > Ajouter > Reference... > Assemblys > cocher PresentationCore > OK

*Expert Elite*
2,140 Posts
253 Kudos
Registered: ‎04-29-2006
Post 2 of 3

Re : Problem to create a palette

04-13-2014 11:14 AM in reply to: otobox

Hi,

 

As it is written, you should add a reference to the PresentationCore assembly.
Right-click the project in the Solution Explorer > Add > Reference... > Assemblies > check PresentationCore > OK

 

 

Salut,

 

Comme il est écrit, il faut que tu ajoutes une référence à l'assembly PresentationCore.

Clic droit sur le projet dans l'explorateur de solutions > Ajouter > Reference... > Assemblys > cocher PresentationCore > OK

Gilles Chanteau
Valued Mentor
360 Posts
29 Kudos
Registered: ‎05-23-2005
Post 3 of 3

Re : Problem to create a palette

04-13-2014 10:37 PM in reply to: _gile

Super ! ça fonctionne, mais j'ai eu du mal à le trouver !

 

Merci :smileyhappy:

 

JM

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post