TheSwamp

Code Red => .NET => Topic started by: sinc on March 31, 2007, 07:12:46 PM

Title: Best way to store text info in a drawing with .NET?
Post by: sinc 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.
Title: Re: Best way to store text info in a drawing with .NET?
Post by: Kerry on March 31, 2007, 07:44:06 PM
Lab 4 – Database Fundamentals Part 2: Adding Custom Data
Title: Re: Best way to store text info in a drawing with .NET?
Post by: Kerry 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.
Title: Re: Best way to store text info in a drawing with .NET?
Post by: sinc on April 01, 2007, 07:47:37 PM
Thanks.  That's what I was looking for.
Title: Re: Best way to store text info in a drawing with .NET?
Post by: TonyT 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.