.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem to create a palette

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
otobox
560 Views, 2 Replies

Problem to create a palette

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.

2 REPLIES 2
Message 2 of 3
_gile
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
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3
otobox
in reply to: _gile

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

 

Merci 🙂

 

JM

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost