Author Topic: Storing notes in a dwg  (Read 12883 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Storing notes in a dwg
« on: July 01, 2004, 11:15:56 AM »
I'm looking for some ideas. I want to store notes in a dwg that are not seen by everyone who opens the file. Perhaps xdata?

thanks
TheSwamp.org  (serving the CAD community since 2003)

hendie

  • Guest
Storing notes in a dwg
« Reply #1 on: July 01, 2004, 11:17:50 AM »
depends upon how why and what you want to do with it. It could be something as simple as text.visible=false
xdata's good though

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Storing notes in a dwg
« Reply #2 on: July 01, 2004, 11:24:19 AM »
Quote from: hendie
depends upon how why and what you want to do with it. It could be something as simple as text.visible=false
xdata's good though

I want something a little more than "text.visible=false" if possible. I realize I'll probably have to write an interface for it, what ever it is!

I want to mainly track changes and what not.

thanks hendie
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Storing notes in a dwg
« Reply #3 on: July 01, 2004, 11:30:01 AM »
I've been thinking of a similar thing for awhile, though it would be available to the user: a tree of notes that reside in dictionary type structure, with an appropriate interface to save, edit, delete, move ...

Anyway, not to derail you Mark ... consider using dictionaries (which sport higher capacities than xdata). If you need to have the data associated w/entites, link the entites to the dictinary by their xdata, otherwise the dictionar(s) can stand on their own.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10637
Storing notes in a dwg
« Reply #4 on: July 01, 2004, 11:34:44 AM »
Wanna "encrypt" it? I've got that string->binary representation progy. (It converts bothways.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

sestes

  • Guest
Storing notes in a dwg
« Reply #5 on: July 01, 2004, 11:37:24 AM »
Quote from: MP
I've been thinking of a similar thing for awhile, though it would be available to the user: a tree of notes that reside in dictionary type structure, with an appropriate interface to save, edit, delete, move ...


That sounds great!  I could defiantly benefit from something like this.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Storing notes in a dwg
« Reply #6 on: July 01, 2004, 11:40:46 AM »
Quote from: sestes
That sounds great!  I could defiantly benefit from something like this.

Oops, didn't mean to hijack this thread! :oops:
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Storing notes in a dwg
« Reply #7 on: July 01, 2004, 11:46:09 AM »
Quote from: MP
I've been thinking of a similar thing for awhile, though it would be available to the user: a tree of notes that reside in dictionary type structure, with an appropriate interface to save, edit, delete, move ...

Anyway, not to derail you Mark ... consider using dictionaries (which sport higher capacities than xdata). If you need to have the data associated w/entites, link the entites to the dictinary by their xdata, otherwise the dictionar(s) can stand on their own.


something like this?
 create new dictionary in collection using the Add method
 add a new XRecord to the dictionary using AddXRecord
 at this point I'm still reading ......   :roll:
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Storing notes in a dwg
« Reply #8 on: July 01, 2004, 11:49:55 AM »
Quote from: Mark Thomas
something like this?
create new dictionary in collection using the Add method
add a new XRecord to the dictionary using AddXRecord
...

Yep, pretty much. Make sure you make the dictionary and it's entries are hard owned (dxf 280 or 281 I believe). That way they'll survive purges, wblocking etc.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Storing notes in a dwg
« Reply #9 on: July 01, 2004, 12:41:05 PM »
xdata would be attached to an object and as such if the object were deleted the data would be lost, other options include ldata and dictionaries.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Storing notes in a dwg
« Reply #10 on: July 01, 2004, 12:58:47 PM »
So it looks like a dictionary is the way to go from what I've read. Correct me if I'm wrong, but it appears you can store most anything in an XRecord, namely text.
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Storing notes in a dwg
« Reply #11 on: July 01, 2004, 01:05:42 PM »
Quote from: Mark Thomas
So it looks like a dictionary is the way to go from what I've read. Correct me if I'm wrong, but it appears you can store most anything in an XRecord, namely text.

Most anything yes, without the 16K xdata ceiling, as well as the ability to be entity agnostic. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

SMadsen

  • Guest
Storing notes in a dwg
« Reply #12 on: July 01, 2004, 03:28:42 PM »
Dicts are pretty easy to work with. Just don't take the authors advice to ENTMOD dictionary entries (he knows nothing).

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Storing notes in a dwg
« Reply #13 on: July 01, 2004, 03:37:10 PM »
thanks so much Stig, I knew should have looked over there.......... David Stein also has a bit about them in his book, so I've got some reading to do!
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Storing notes in a dwg
« Reply #14 on: July 01, 2004, 03:56:57 PM »
Quote from: SMadsen
Dicts are pretty easy to work with. Just don't take the authors advice to ENTMOD dictionary entries (he knows nothing).

O........M.............G Where have I been!! Stig, that is great stuff. I know what I'm doing in the morning. :D
TheSwamp.org  (serving the CAD community since 2003)