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

HighlightOverrule Class

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
youssefGC
323 Views, 7 Replies

HighlightOverrule Class

Hello,

 

I want to work with the HighlightOverrule class. According to the online documentation, this class is derived from the following hierarchy: Autodesk.AutoCAD.DatabaseServices.HighlightOverrule.

However, when I try to implement it in my project, the class is not found. The issue is that I am using recent versions of the .NET framework. My question is, does this class still exist?

 

Thank you.

 

 

7 REPLIES 7
Message 2 of 8
norman.yuan
in reply to: youssefGC

You might want to try clarify what you asked:

 

What does mean "class is not found"? Do you simply look through the Object Browser for the Autodesk.AutoCAD.DatabaseServices namespace (I am SURE you have Acadbmgd.dll referenced in your project)? If you do not see Autodesk.AutoCAD.DatabaseServices in the Object Browser window, then you ARE not doing AutoCAD .NET programming project. Or, you might simply missing "using Autodesk.AutoCAD.DatabaseServices;" in your *.cs/*.vb code file.

 

Rather than saying "...recent version of .NET framework...", why not say EXACTLY WHICH VERSION of .NET Framework? If you are doing Acad2024 or older version of AutoCAD, .NET framework version would have nothing to do with HighlightOverrule class being found or not: it is in the AcadDbMgd.dll.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 8

HighlightOverrule exists in every version of AutoCAD.

 

It requires a reference to AcDbMdg.dll.

 

The version of the framework you're using has nothing to do with it, other than that you must be using a version that's compatible with the version of AutoCAD you're targeting.

 

Message 4 of 8
youssefGC
in reply to: youssefGC

I have the AcDbMdg.dll reference loaded in my project, but even with that, HighlightOverrule is not detected by my Visual Studio.

Here is a part of the code where I have the problem:

youssefGC_0-1716217023697.png

 

These are the DLLs loaded in my project:

youssefGC_1-1716217051186.png

 

 

 

 

Message 5 of 8
norman.yuan
in reply to: youssefGC

What about "...recent version of .NET framework" you mentioned? Are you sure you created CORRECT(!) .NET Framework class library project (for Acad2024 or older), or .NET 8 class library project for Acad2025?

 

Norman Yuan

Drive CAD With Code

EESignature

Message 6 of 8

You are having the problem because the containing namespace has the same name as the class. Change the name of the namespace from HighlightOverrule to something else. 

Message 7 of 8
norman.yuan
in reply to: youssefGC

@ActivistInvestor, good catch.

Norman Yuan

Drive CAD With Code

EESignature

Message 8 of 8

Thank you, it works now. The problem is with the namespace name.

 

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

Post to forums  

Forma Design Contest


AutoCAD Beta