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

Get localized type names or all geometry types

232 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,388
Registered: ‎04-09-2008
Message 2 of 3 (214 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 (185 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


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community