TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: whdjr 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).
-
Look up these sys vars -- dwgtitled, dbmod as well as the lisp functions -- acad-push-dbmod, acad-pop-dbmod.
-
Would checking the Total Editing Time tell you anything?
-
Good thinking Alan.
-
Thanks guys I'll look into these. :-)
-
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,
-
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?
-
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.
-
I think you're correct there as my new drawings inherit the template editing time.
-
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.
-
Now that I sit and try to pen my logic I see the huge flaw in my thought process(or lack of). :oops:
-
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: