Posts: 15
Registered: ‎05-01-2012
Message 1 of 3 (298 Views)
Accepted Solution

Get localized type names or all geometry types

298 Views, 2 Replies
07-10-2013 01:11 AM

Is it possible to get localized names for AutoCAD .NET geometry types?

For example, I want to get "Полилиния" (in Russian) for Autodesk.AutoCAD.DatabaseServices.Polyline class.


If there is no solution, where can I get a list of all geometry types to translate them into another language programmatically?

Posts: 1,406
Registered: ‎04-09-2008
Message 2 of 3 (280 Views)

Re: Get localized type names or all geometry types

07-10-2013 06:43 AM in reply to: ilya.s.solovyev

1. Those are not geometrical types but entities types.

2. Next code may help you:

public static void GetObjName()
  Document doc = Application.DocumentManager.MdiActiveDocument;
  Editor ed = doc.Editor;
  PromptEntityResult pres = ed.GetEntity("\nSelect Entity: ");
  if (pres.Status == PromptStatus.OK)
    ed.WriteMessage("\nName: {0}", 

This code can display name of entity identifying with its ObjectId.

Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

*Expert Elite*
Posts: 1,569
Registered: ‎10-08-2008
Message 3 of 3 (251 Views)

Re: Get localized type names or all geometry types

07-10-2013 01:48 PM in reply to: ilya.s.solovyev

In addition to code above, this will return correct entity type:


 So if you clicked light polyline, this code return LWPOLYLINE instead of POLYLINE

as per in Alexander's code

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.