Sunday, May 10, 2009

Dictionaries inside AutoCad

I am writing this blog on Dictionaries inside AutoCAD as follow-up to my last blog posting defining Xrecords inside AutoCAD. Dictionaries are containers in essence, that by themselves do not hold the data you intend to store and retrieve. They hold a variety of other objects that contain the data; Xrecords for example. Dictionaries can also contain other dictionaries; basically you can nest the dictionaries. Using dictionary and Xrecords is a means to store data that has no graphical representation - a means to what I call creating a smart drawing. You can store data for variables, create parametric drawings, store selection sets, etc.... Since the data is stored when you save the drawing, anything you store will be available the next time you open the drawing. To me the limiting factor is your imagination.

There are 2 types of dictionaries I am going to talk about, one being the Named Object Dictionary (NOD) and the other is an Extension Dictionaries.

NOD
This dictionary is the parent dictionary that owns all other dictionaries. This is where you should place data for the entire drawing so you can gain access to it at any time during your programming and know that it is drawing specific - I refer to this as global access. This dictionary will always be preset in the database. Since AutoCAD uses this dictionary for items such as mlines, you do not want to store your Xrecords directly into the NOD. You will want to create a dictionary that is specific to you inside the NOD where you will store your Xrecords. I believe this helps to organize your data more efficiently.

Extension Dictionary
This dictionary is nothing more than a dictionary that attaches to entities that store Xrecords which are entity specific. There is a lot you can do that is entity specific, such as point to other entities or possibly create entity specific standards. Here is an example of how I’ve seen an extension dictionary used: Consider you are working on a drawing in English and it needs to be read in both Spanish and English. You can merely attach an extension dictionary to the text entities that can hold both English text and the Spanish text and have the drawing update to either version. Of course, there is more involved to this process than just adding the extension dictionary – but the intention of the example is to help clarify how an extension dictionary can be used effectively.Hopefully this information helps to explain what dictionaries are and how you can use them with Xrecords to expand the ability of a drawing.

In the near future I will be sharing code examples to show you how to get at dictionaries, add dictionaries, add Xrecords, etc...

To share your comments and questions, please contact me or respond to this blog.

Patrick Johnson

Labels: ,

3 Comments:

  • Thanks. Now i am sure that we can add dictionary, I use AutoCAD 2006 nad Autocad 2005 Version, I know i even have 2002 version, But I always wondered how to add other language dictionery..

    Can i get a step by step guide too please

    Ram

    By Blogger James Bond 007, At June 7, 2009 10:40 PM  

  • I will do another blog in the near future on what needs to be done to accomplish this. Actually i will try and get it done this week. If you want more detail feel free to contact us

    pat

    By Blogger Patrick Johnson, At June 8, 2009 4:52 AM  

  • Thank you, that is a good start.

    By Blogger Zak, At June 26, 2009 4:46 PM  

Post a Comment