Did you know about this utility class?

By Stephen Preston

A very useful, yet often overlooked, utility class is Autodesk.AutoCAD.DatabaseServices.SymbolUtilityServices. It’s a placeholder class where you’ll find lots of useful functions for working with symbols tables (block tables, layer tables, etc.). Here’s a really short piece of (VB.NET) sample code showing how to use it:

Dim db As Database
      Dim id As ObjectId
      db = Application.DocumentManager.MdiActiveDocument.Database
      id = SymbolUtilityServices.GetBlockModelSpaceId(db)

Look it up in the ObjectARX helpfiles to see all the helper functions it includes.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

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

Continue reading