Author Topic: Best way to store text info in a drawing with .NET?  (Read 3133 times)

0 Members and 1 Guest are viewing this topic.

sinc

  • Guest
Best way to store text info in a drawing with .NET?
« on: March 31, 2007, 07:12:46 PM »
What's the best way to include user data in a drawing?  I'm looking for something that works basically like the VLAX-LDATA stuff in Lisp.

I tried using the UserData collection on the Document class, but it doesn't seem to be saved with the drawing.  So I'm guessing it needs to be a database-resident entity.

I looked at the DBDictionary and DictionaryWithDefaultDictionary stuff, but I don't think they do what I want.  Those seem to provide dictionaries of ObjectIds, whereas I want to write some string values to the drawing that I can read again the next time the drawing is opened.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Best way to store text info in a drawing with .NET?
« Reply #1 on: March 31, 2007, 07:44:06 PM »
Lab 4 – Database Fundamentals Part 2: Adding Custom Data
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Best way to store text info in a drawing with .NET?
« Reply #2 on: March 31, 2007, 08:02:38 PM »
Since the Data is specific to a DataBase
One option is XRecords :

Create your own Dictionary under the Named Object dictionary [NOD]
then Create XRecords under your Dictionary.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

sinc

  • Guest
Re: Best way to store text info in a drawing with .NET?
« Reply #3 on: April 01, 2007, 07:47:37 PM »
Thanks.  That's what I was looking for.

TonyT

  • Guest
Re: Best way to store text info in a drawing with .NET?
« Reply #4 on: April 04, 2007, 02:27:00 PM »
Thanks.  That's what I was looking for.

And don't forget that you can't store strings > 255 charcters
in an XRecord, unless you break them up into multiple groups.