Annotation scale being used in Model Space

By Adam Nagy

I’m trying to get back the annotation scale being used in Model Space.

The below picture shows what I’m looking for:
Cannoscale
Solution

If you change the Annotation Scale value in Model Space, then you’ll see that the _CANNOSCALE command is being used in the background. Now if you look for that name in the Visual Studio Object Browser, then you’ll find Database.Cannoscale, which is the variable you are looking for:

[CommandMethod(“AEN1GetAnnotationScale”)]

static public void AEN1GetAnnotationScale()

{

  Database db = HostApplicationServices.WorkingDatabase;

  Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.

    DocumentManager.MdiActiveDocument.Editor;

 

  ed.WriteMessage(

    “Current annotation scale is: “ + db.Cannoscale.Name + “\n”);

}


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading