Author Topic: Saved vs. New Drawing  (Read 3394 times)

0 Members and 1 Guest are viewing this topic.

whdjr

  • Guest
Saved vs. New Drawing
« on: October 10, 2005, 08:25:40 AM »
Is there an easy way to tell if a dwg is saved or if it is brand new?  (other than just reading the filename to see if it is called untitled-X).

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Saved vs. New Drawing
« Reply #1 on: October 10, 2005, 08:33:13 AM »
Look up these sys vars -- dwgtitled, dbmod as well as the lisp functions -- acad-push-dbmod, acad-pop-dbmod.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Saved vs. New Drawing
« Reply #2 on: October 10, 2005, 08:34:46 AM »
Would checking the Total Editing Time tell you anything?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Saved vs. New Drawing
« Reply #3 on: October 10, 2005, 08:39:20 AM »
Good thinking Alan.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

whdjr

  • Guest
Re: Saved vs. New Drawing
« Reply #4 on: October 10, 2005, 08:54:18 AM »
Thanks guys I'll look into these. :-)

whdjr

  • Guest
Re: Saved vs. New Drawing
« Reply #5 on: October 10, 2005, 09:11:32 AM »
It seems like 'dwgtitled' is the way to go.

dwgtitled     -    Indicates whether the current drawing has been named.(by the user)

0   Drawing has not been named
1   Drawing has been named

dbmod   -   Only tells you if the database is empty, has data in it, or a command has been called. 
                 It is not a sure fire way to tell if the dwg has been saved.

acad-push-dbmod and acad-pop-dbmod seem like a way to add data to a dwg database and then reset the dbmod sysvar so the dwg acts as if it hasn't been modified since the last save.

I wasn't sure where to look for the Editting time.  All I could get was the 'time' function and that looked like too much info.

Thanks for all the help guys,

whdjr

  • Guest
Re: Saved vs. New Drawing
« Reply #6 on: October 10, 2005, 09:36:44 AM »
Just thinking out loud...

Do you think 'acad-push-dbmod' and 'acad-pop-dbmod' could be used in conjunction with ObjectDBX to keep the drawing preview intact?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Saved vs. New Drawing
« Reply #7 on: October 10, 2005, 09:38:45 AM »
I have a recollection that Total Editing Time is affected by the Template drawing used.
Seems you have it sorted using 'dwgtitled', so that may be irrelevant anyway, but worth checking if you decide to have another look at the time.

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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Saved vs. New Drawing
« Reply #8 on: October 10, 2005, 09:52:38 AM »
I think you're correct there as my new drawings inherit the template editing time.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Saved vs. New Drawing
« Reply #9 on: October 10, 2005, 09:56:41 AM »
Do you think 'acad-push-dbmod' and 'acad-pop-dbmod' could be used in conjunction with ObjectDBX to keep the drawing preview intact?

I don't see how but I'l like to hear your logic.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

whdjr

  • Guest
Re: Saved vs. New Drawing
« Reply #10 on: October 10, 2005, 10:28:10 AM »
Now that I sit and try to pen my logic I see the huge flaw in my thought process(or lack of). :oops:

whdjr

  • Guest
Re: Saved vs. New Drawing
« Reply #11 on: October 10, 2005, 10:29:53 AM »
I guess I was thinking there might be a way to add data to a DBX database without actually saving the file, thus losing the preview. :lol: