TheSwamp

CAD Forums => CAD General => Topic started by: MSTG007 on January 12, 2005, 10:16:46 PM

Title: Keeping Track of Plotting Paper
Post by: MSTG007 on January 12, 2005, 10:16:46 PM
Is there a way to keep track of all the plotted papers which you create with ACAD with a bunch of users?

So when a user plots, a box appears asking or it automatically takes the drawing name and places it in a database where you can look at it at the end of the month or something?

What do you guys do?

whats a free route to this too?

thanks
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 13, 2005, 07:50:27 AM
That's a really good question!
I'm going to ask our IT guy what he uses to see if it may have some application to this problem.
I'll be back. ;)
Title: Keeping Track of Plotting Paper
Post by: ELOQUINTET on January 13, 2005, 07:57:01 AM
yeah we go through about a roll a day here. it would be interesting to see a pie chart of the percentages by each user. good idea
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 13, 2005, 07:59:22 AM
I'd be interested to see if there are any Non-CAD people using the plotter.  I know our IT guy has a program where he can see WHO printed WHAT from WHERE and WHEN...I just sent him an e-mail to see if he could see what size it was (ie 8.5 x 11, 11 x 17, 24 x 36, etc)
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 13, 2005, 08:00:47 AM
BTW:  A ROLL A DAY?!?!?!

Sheesh!  Do you guys go out and have a tree planting day once a year or what?  ;)
Title: Keeping Track of Plotting Paper
Post by: CADaver on January 13, 2005, 08:52:27 AM
A roll a day, gee, we can go through a roll every half hour some days, then we get in a hurry.

We capture the contract number (client), file name, and user at the network plotter queue.  Not real sure how it's done, but the IT guys post a report at the end of every month.
Title: Keeping Track of Plotting Paper
Post by: hudster on January 13, 2005, 08:53:47 AM
This would be a great program to have.

We use about 10 45m rolls a week at the moment, but about 10% of the drawings printed are never picked up from the plotter.  If I could find out who was doing it I could jump all over them.
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 13, 2005, 09:18:31 AM
Quote from: Hudster
...but about 10% of the drawings printed are never picked up from the plotter.  If I could find out who was doing it I could jump all over them.


That, you could take care of with a plot stamp that includes the username...I know what you mean, it happens here too.
Title: Keeping Track of Plotting Paper
Post by: hudster on January 13, 2005, 09:35:59 AM
Quote from: M-dub
That, you could take care of with a plot stamp that includes the username.


The boss won't let us use plot stamps :roll:
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 13, 2005, 09:41:46 AM
Quote from: Hudster
The boss won't let us use plot stamps :roll:


It must be the boss who's leaving all those plots in there then! ;)
Title: Keeping Track of Plotting Paper
Post by: CADaver on January 13, 2005, 10:03:07 AM
Quote from: Hudster
Quote from: M-dub
That, you could take care of with a plot stamp that includes the username.


The boss won't let us use plot stamps :roll:
Figure out about how much paper is wasted every month on trash plots.  Show that figure to the boss and tell him you could save that money with plotstamps.  If he's not moved to action then, ignore the problem.
Title: Keeping Track of Plotting Paper
Post by: Keith™ on January 13, 2005, 11:39:05 AM
Our plotter tracks which computer sent the plots and it is stored on the plotter HD ... if I want to know who is plotting what I simply browse to the plotter, log in, and check the plot log. It tells me who, what, when, and how many.
Title: Keeping Track of Plotting Paper
Post by: Dent Cermak on January 13, 2005, 12:24:35 PM
if the roll is thinner, i figure somebody plotted something, otherwise, i could care less. i do worry about the paper supply in the can though. that can get critical.
Title: Keeping Track of Plotting Paper
Post by: CADaver on January 13, 2005, 12:57:28 PM
Quote from: Dent Cermak
if the roll is thinner, i figure somebody plotted something, otherwise, i could care less.
ahh the joys of the small office, I remember them well... sigh...

With over 200 designers and 50 engineers hitting the plotters with plots, if we can save just one plot per person per day we can save over 200 rolls a paper a year.  Heck, if I could get everybody to just LOOK ot the bleeding plot scale prior to sending the bleeding plot, we could save 100 rolls a year.  Paperless office my Gluteus Maximus.
Title: Keeping Track of Plotting Paper
Post by: dubb on January 13, 2005, 01:19:44 PM
i have submitted a particular thread related to this. what i have used to track plotters and all the printers in the network, in the past, was a program called "Technesis"

http://www.smartplot.com/

this program is installed into any folder on the local intranet and each user has a separate installation that is linked to that program, basically known as a their client software. with the main program it allows you to manage every aspect of printing/plotting such as the roll size, billable, non-billabe, unit cost, pie graphs & charts, archiving of invoices, and many more. however, i wish there was a way to do it with lisp. that would be cool. and the most suckiest part of this program is that its abot 200 bucks for the main program and 75 bucks for each client (pc per user). i  believe this program is a real nice way to keep track of drafting budget if you are concerned about it. because bond, vellum, mylar, and most types of special papers are pretty expensive. if your spending a lot on paper its always cheaper to get them buy bulk, the more you buy the less per roll.
Title: Keeping Track of Plotting Paper
Post by: jwisherd on January 13, 2005, 02:23:10 PM
We have a small high production office with about 8 drafters/designers, We have a hand written plot log on top of the plotter. Every plot sent is susposto be entered on the log. Number of sheets, project, date, and reason. We also have a slave driver in billing that keeps on us about this as she enters the info in to the clients billing statements, if they request it.
It's not the most accurate process as it sometimes dosn't get filled in, but it works quite well. If there are any simple programs, it might be an efficient route for us.
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 13, 2005, 02:32:18 PM
It's funny, but sometimes we have to revert back to 'the old days'.  If there was someone working who had a view of the plotter, they'd be able to see who goes up to get something and doesn't record it.
Anyway, I'm still waiting to hear back from my IT guy.  He's been in a meeting all day.
Title: Keeping Track of Plotting Paper
Post by: danny on January 13, 2005, 02:35:36 PM
I've been looking around for such a program that will track plots also.  All I was looking for is who plotted it, what kind & size of paper, when/time, and of course job #.  The office I'm working is not willing to pay big bucks for such a program....Doesn't make any sense to me cause we always gotta put a job # in the plotters/printers when we make copies, but someone can send a print from their computer that uses a hole ream of paper and it won't be tracked to a job #.  I also noticed all the personal stuff being printed...one of the reasons for such high overhead cost...
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 13, 2005, 02:41:29 PM
If I worked at it for a month or so, I could MAYBE write something in VBA to append certain information to a spreadsheet or access database or something every time a successful plot was made.  If the function was added to everyone's plot command, it might work, but I'm sure that there'd be a workaround.  Besides, you'd want it to count plots sent from other programs as well, I'm sure.

I dunno...just dreamin', I guess. ;)
Title: Keeping Track of Plotting Paper
Post by: danny on January 13, 2005, 03:08:39 PM
yeah.. i've seen and used tools that work between different programs like AutoCAD, Microsoft Word, Excel, etc...and I've tried looking at the guts of it.  Don't understand much cause I'm just a beginner...
Quote
If I worked at it for a month or so, I could MAYBE write something in VBA

but if any person here attempts to build such a tool, I would like to follow along and learn the process.
Quote
I dunno...just dreamin', I guess
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 13, 2005, 03:23:21 PM
Time is a factor that I am not too familiar with these days, what with home renovations and wedding plans going on.  :roll:
Title: Keeping Track of Plotting Paper
Post by: PDJ on January 13, 2005, 07:10:45 PM
Ummm.. Wedding plans?? All you have to do is sit back and say things like "That sounds like a GREAT idea sweetie" or "Yes, that's exactly what I was thinking too!!".. Follow it with a kiss and you'll be done in time for halftime.  

Weddings are for the females.  How many times have you heard a bunch of guys sitting together talking about thier wedding and where they got thier tux??  The last thing we remember is the bachelors party, everything else is a blur..
Title: Keeping Track of Plotting Paper
Post by: M-dub on January 14, 2005, 07:49:13 AM
I'm supposed to go get fitted for the tux this weekend!  I don't know why it has to be so long before the wedding!!!  I'm hoping to lose some weight before the big day anyway.  Ah well...like you said..."Yes dear, whatever you say, dear..."
I just have to start mumbling to myself a little quieter and rolling my eyes AFTER I've turned around. :roll: ;)
Title: Keeping Track of Plotting Paper
Post by: TR on January 14, 2005, 12:46:15 PM
Sounds like a good idea for a project. If people are really interested I can write something to handle this. Just give me an idea of what exactly you're looking for.
Title: Keeping Track of Plotting Paper
Post by: MSTG007 on January 14, 2005, 02:57:31 PM
How about a box that prompts up asking for the Job#... and it puts it in a excel file or something
Title: Keeping Track of Plotting Paper
Post by: danny on January 14, 2005, 03:45:15 PM
m-dub wrote
Quote
I just have to start mumbling to myself a little quieter and rolling my eyes AFTER I've turned around.

Sounds like wedding plans and home renovations is not all thats going to be taking up time...looks like some potential drama occuring.  oh-boy...don't want that happening... :)
Title: Keeping Track of Plotting Paper
Post by: dubb on January 17, 2005, 12:24:28 PM
how about a program that outputs the users name, what plotter or printer. size of sheet, quantitity, type of plot (submittal plotcheck), cost per unit. anything else?
Title: Keeping Track of Plotting Paper
Post by: danny on January 17, 2005, 02:42:02 PM
dubb,
Job # for billing.
Title: Keeping Track of Plotting Paper
Post by: MSTG007 on January 17, 2005, 10:13:50 PM
yup... and it goes into excel or something... and at the end of the month you can print it off and be done with it!
Title: Keeping Track of Plotting Paper
Post by: dubb on January 18, 2005, 05:08:15 PM
if any body had checked out my previous post on this topic, take a look at the smartplot program. its basically covers the whole drafting marketing information. it can be installed on any computer wether or not they have autocad installed on their pc. with the reports i can use the statistics decide how much paper to order. so many uses for tracking print ques.
Title: Keeping Track of Plotting Paper
Post by: danny on January 27, 2005, 01:56:53 PM
ok, I got this from theswamp a while back. This routine was written by Craig and its a lisp that works with a dcl file to track plots.  I've just tested it out any got an error message about not finding a newdate block.  Maybe someone can help take a look at this.
Code: [Select]
;;; plotlog.lsp
;;; Usage: This routine was designed to keep a log of all plots by writing the
;;; selections to a text file at G:\plotlog.txt. It inserts the following into
;;; the plot log:
;;; Job Number - Paper Used - Sheet Size - Square Feet - Month - Day - Year - Task Number
;;;
;;;
;;; Written By: Craig Boggan
;;; Created: February 12, 2003
;;;
;;; Updated: April 30, 2003
;;;          Added task number to job number
;;;
;;; CAD Program(s): AutoCAD 14+
;;;
(defun c:plotlog (/ cmd paper billable cm dm task)
  (setq cmd (getvar "cmdecho"))
  (setvar "cmdecho" 0)
;;;;;;Begin dialog box
  (setq dcl_id (load_dialog "plotlog.dcl"))
  (if (not (new_dialog "plotlog" dcl_id))
    (exit);;if dialog not found..exit
  );;end if
  (action_tile "no" "(progn(setq dm $key)(activate))")
  (action_tile "yes" "(progn(setq dm $key)(go_hpconfig)(activate))")
  (action_tile "bond" "(setq paper $key)")
  (action_tile "vellum" "(setq paper $key)")
  (action_tile "mylar" "(setq paper $key)")
  (action_tile "0" "(progn(setq task $key)(deactivate))")
  (action_tile "1" "(progn(setq task $key)(deactivate))")
  (action_tile "2" "(progn(setq task $key)(deactivate))")
  (action_tile "3" "(progn(setq task $key)(deactivate))")
  (action_tile "4" "(progn(setq task $key)(deactivate))")
  (action_tile "5" "(progn(setq task $key)(deactivate))")
  (action_tile "other" "(progn(setq insert_other $key)(activate_other))")
  (action_tile "insert" "(setq task $value)")
  (action_tile "cancel" "(progn(setq cm $key)(done_dialog))")
  (action_tile "ok" "(progn(setq cm $key)(done_dialog))")
  (start_dialog)
  (unload_dialog dcl_id)
;;;;;;End dialog box
  (if (= cm "cancel")
    (princ "\nPlotlog aborted by user ")
    );;end if
  (if (= cm "ok")
    (check_newdate2);;if OK is selected on dialog box go to sub-routine check_newdate2
    );;end if
  (setvar "cmdecho" cmd)
  (princ)
  );;end defun plotlog
 

;;-------------------------------------------------------------
;; This checks to make sure the newdate stamp is on the drawing
;; before going any further. If it's not found, the program will
;; end with no errors showing across the command line
;;--------------------------------------------------------------
(defun check_newdate2 (/ find_block)
  (setq find_block (ssget "x" '((0 . "INSERT") (2 . "NEWDATE2"))))
  (if (= find_block nil)
    (alert "\nNewdate block not found...Exiting ")
    );;end if
  (if (/= find_block nil)
    (check_box)
    );;end if
  );;end defun check_newdate2

(defun go_hpconfig ()
  (c:hpconfig)

Code: [Select]
dcl_settings : default_dcl_settings { audit_level = 3; }

plotlog : dialog {
    label = "Plot Log";
    : boxed_row {
        label = "Check your HPCONFIG";
        : button {
            label = "No";
            mnemonic = "N";
            key = "no";
        }
        : button {
            label = "Yes";
            mnemonic = "Y";
            key = "yes";
        }
    }
    : boxed_radio_row {
        label = "Select Paper Grade";
        mnemonic = "S";
        : radio_button {
            label = "Bond";
            mnemonic = "B";
            key = "bond";
            is_enabled = false;
        }
        : radio_button {
            label = "Vellum";
            mnemonic = "V";
            key = "vellum";
            is_enabled = false;
        }
        : radio_button {
            label = "Mylar";
            mnemonic = "M";
            key = "mylar";
            is_enabled = false;
        }
    }
    : boxed_row {
        label = "Select Task Number";
        mnemonic = "T";
        : radio_row {
            value = "Tsk";
            : radio_button {
                label = ".0";
                key = "0";
                is_enabled = false;
            }
            : radio_button {
                label = ".1";
                key = "1";
                is_enabled = false;
            }
            : radio_button {
                label = ".2";
                key = "2";
                is_enabled = false;
            }
            : radio_button {
                label = ".3";
                key = "3";
                is_enabled = false;
            }
            : radio_button {
                label = ".4";
                key = "4";
                is_enabled = false;
            }
            : radio_button {
                label = ".5";
                key = "5";
                is_enabled = false;
            }
            : radio_button {
                label = "Other";
                mnemonic = "O";
                key = "other";
                is_enabled = false;
            }
        }
    }
    : boxed_row {
        alignment = right;
        fixed_width = true;
        width = 10;
        : edit_box {
            label = "Task Number";
            mnemonic = "I";
            key = "insert";
            alignment = centered;
            fixed_width = true;
            width = 10;
            is_enabled = false;
        }
    }
    : row {
        key = "YN";
        alignment = centered;
        fixed_width = true;
        width = 27;
        : button {
            label = "Add to Plotlog";
            mnemonic = "A";
            key = "ok";
            fixed_width = true;
            width = 10;
        }
        : button {
            label = "Skip Plotlog";
            mnemonic = "S";
            key = "cancel";
            fixed_width = true;
            is_cancel = true;
            width = 5;
            is_default = true;
        }
    }
}
Title: Keeping Track of Plotting Paper
Post by: whdjr on January 27, 2005, 02:37:47 PM
You have to have the "newdate2" block in the file you are running it on.
Title: Keeping Track of Plotting Paper
Post by: danny on January 27, 2005, 03:43:45 PM
sorry...didn't insert the intire code.
Code: [Select]
;;; plotlog.lsp
;;; Usage: This routine was designed to keep a log of all plots by writing the
;;; selections to a text file at G:\plotlog.txt. It inserts the following into
;;; the plot log:
;;; Job Number - Paper Used - Sheet Size - Square Feet - Month - Day - Year - Task Number
;;;
;;;
;;; Written By: Craig Boggan
;;; Created: February 12, 2003
;;;
;;; Updated: April 30, 2003
;;;          Added task number to job number
;;;
;;; CAD Program(s): AutoCAD 14+
;;;
(defun c:plotlog (/ cmd paper billable cm dm task)
  (setq cmd (getvar "cmdecho"))
  (setvar "cmdecho" 0)
;;;;;;Begin dialog box
  (setq dcl_id (load_dialog "plotlog.dcl"))
  (if (not (new_dialog "plotlog" dcl_id))
    (exit);;if dialog not found..exit
  );;end if
  (action_tile "no" "(progn(setq dm $key)(activate))")
  (action_tile "yes" "(progn(setq dm $key)(go_hpconfig)(activate))")
  (action_tile "bond" "(setq paper $key)")
  (action_tile "vellum" "(setq paper $key)")
  (action_tile "mylar" "(setq paper $key)")
  (action_tile "0" "(progn(setq task $key)(deactivate))")
  (action_tile "1" "(progn(setq task $key)(deactivate))")
  (action_tile "2" "(progn(setq task $key)(deactivate))")
  (action_tile "3" "(progn(setq task $key)(deactivate))")
  (action_tile "4" "(progn(setq task $key)(deactivate))")
  (action_tile "5" "(progn(setq task $key)(deactivate))")
  (action_tile "other" "(progn(setq insert_other $key)(activate_other))")
  (action_tile "insert" "(setq task $value)")
  (action_tile "cancel" "(progn(setq cm $key)(done_dialog))")
  (action_tile "ok" "(progn(setq cm $key)(done_dialog))")
  (start_dialog)
  (unload_dialog dcl_id)
;;;;;;End dialog box
  (if (= cm "cancel")
    (princ "\nPlotlog aborted by user ")
    );;end if
  (if (= cm "ok")
    (check_newdate2);;if OK is selected on dialog box go to sub-routine check_newdate2
    );;end if
  (setvar "cmdecho" cmd)
  (princ)
  );;end defun plotlog
 

;;-------------------------------------------------------------
;; This checks to make sure the newdate stamp is on the drawing
;; before going any further. If it's not found, the program will
;; end with no errors showing across the command line
;;--------------------------------------------------------------
(defun check_newdate2 (/ find_block)
  (setq find_block (ssget "x" '((0 . "INSERT") (2 . "NEWDATE2"))))
  (if (= find_block nil)
    (alert "\nNewdate block not found...Exiting ")
    );;end if
  (if (/= find_block nil)
    (check_box)
    );;end if
  );;end defun check_newdate2

(defun go_hpconfig ()
  (c:hpconfig)
  );;end defun go_hpconfig

;;-------------------------------------------------------------
;; This checks to see which radio buttons were selected on the
;; dialog box and sets the appropriate values
;;--------------------------------------------------------------
(defun check_box ()
  (if (= paper "bond")
    (progn
      (setq paper "Bond")
      (start_plotlog)
      );;end progn
    );;end if
  (if (= paper "vellum")
    (progn
      (setq paper "Vellum")
      (start_plotlog)
      );;end progn
    );;end if
  (if (= paper "mylar")
    (progn
      (setq paper "Mylar")
      (start_plotlog)
      );;end progn
    );;end if
  );;end defun check_box


;;---------------------------------------------------------
;; This is section is where the program gathers most of its
;; data and writes it to a plotlog text file
;;---------------------------------------------------------
(defun start_plotlog (/   dwg_name   check_date job_number index
         fb1      fb2         sheet_size count
         sheet_length         sheet1    sheet2
         square_feet         plotlog_line
         fil      f         date1    year
         month      day         date2    time
         time1      time2      time3
             )
  (setq dwg_name (getvar "dwgname"))
  (setq check_date (substr dwg_name 1 1));;this finds out if it was in 1999 or 2000+
  (if (= check_date "9")
    (setq job_number (strcat "9" (substr dwg_name 2 4)));;this creates the job number
    );;end if
  (if (= check_date "0")
    (setq job_number (strcat "2" (substr dwg_name 2 4)));;this creates the job number
    );;end if
  (setq index 0)
  (setq fb1 (entget (ssname find_block index)));;gets first list from block
  (setq fb2 (entget(entnext(entnext(entnext(cdr(assoc -1 fb1)))))));;gets sub-list from same block to find sheet size
  (setq sheet_size (cdr(assoc 1 fb2)))
  ;;---------------------------------------------------------
  ;; This section find the "," between the sheet size numbers
  ;;---------------------------------------------------------
  (setq sf sheet_size
         count 1
   );end setq
   (while
     (not
       (wcmatch (substr sf count 2) "*`,")
     );end not
      (setq count (1+ count))
   );end while
  ;;-------------------------
  ;; End of searching for ","
  ;;-------------------------
  (setq sheet_length (strlen sheet_size));;total length of sheet size extracted
  (setq sheet1 (*(atof(substr sheet_size 1 count))));;extracts out first number
  (setq sheet2 (atof(substr sheet_size (+ count 2) sheet_length)));;extracts out second number
  (setq square_inch (/(* sheet1 sheet2)12));;multiplies two sheet numbers then divides by 12 to get square inch
  (if (= paper "Bond")
    (setq price (strcat "$"(rtos(* square_inch 0.047)2 2)))
    );;end if
  (if (= paper "Vellum")
    (setq price (strcat "$"(rtos(* square_inch 0.11)2 2)))
    );;end if
  (if (= paper "Mylar")
    (setq price "Unknown")
    );;end if
  (setq square_feet (rtos(/(* sheet1 sheet2)12)))
  (setq sheet_size (strcat (rtos sheet1 2 0)"x"(rtos sheet2 2 0)))
  (setq date1 (rtos(getvar "cdate")2 0))
  (setq year (substr date1 1 4));; Extracts out the year from the CDATE variable
  (setq date1 (substr date1 5 8))
  (setq month (substr date1 1 2));; Extracts out the month by number from the CDATE variable
  ;; Check what month is active at the time of extraction
  (if (= month "01")(setq month "January"))
  (if (= month "02")(setq month "February"))
  (if (= month "03")(setq month "March"))
  (if (= month "04")(setq month "April"))
  (if (= month "05")(setq month "May"))
  (if (= month "06")(setq month "June"))
  (if (= month "07")(setq month "July"))
  (if (= month "08")(setq month "August"))
  (if (= month "09")(setq month "September"))
  (if (= month "10")(setq month "October"))
  (if (= month "11")(setq month "November"))
  (if (= month "12")(setq month "December"))
  (setq day (substr date1 3 4));; Extracts out the day from the CDATE variable
  (setq time1 (rtos(getvar "cdate")2 4))
  (setq time2 (strlen time1))
  (setq time3 (substr time1 (- time2 3) time2))
  (setq time (strcat(substr time3 1 2)":"(substr time3 3 4)))
  (setq job_task_number (strcat job_number "." task))
  (setq plotlog_line (strcat job_task_number "," paper "," sheet_size "," square_feet "," month " " day " " year "," time "," price))
  (setq fil1 (open "G:\plotlog.txt" "a"))
  ;(setq fil (getfiled "Select Plot Log file :" "G:\plotlog" "txt" 8))
  (if (= fil1 nil)
    (progn
      (princ "\nPlotlog.txt is missing from H:\ drive ")
      (exit)
      );;end progn
    );;end if
  ;(setq f (open fil "a"))
  (write-line plotlog_line fil1)
  (close fil1)
  );;end defun start_plotlog

(defun activate ()
 (if (/= dm nil);if selected
   (progn
     (mode_tile "bond" 0);enable
     (mode_tile "vellum" 0);enable
     (mode_tile "mylar" 0);enable
     (mode_tile "0" 0);enable
     (mode_tile "1" 0);enable
     (mode_tile "2" 0);enable
     (mode_tile "3" 0);enable
     (mode_tile "4" 0);enable
     (mode_tile "5" 0);enable
     (mode_tile "other" 0);enable
     );;end progn
   );;end if
);end activate

(defun activate_other ()
  (if (/= insert_other nil);if selected
    (progn
      (mode_tile "insert" 0);enable
      )
    (progn
      (mode_tile "insert" 1);disable
      )
   );;end if
);end activate_other

(defun deactivate ()
  (mode_tile "insert" 1)
  );;end defun deactivate
Title: Keeping Track of Plotting Paper
Post by: danny on January 27, 2005, 03:48:15 PM
whdjr
Quote
You have to have the "newdate2" block in the file you are running it on.

 :?  don't know what the block is for.  tried to create a dummy block with the name newdate2 but it still don't work.  It must be looking for a certain attribute within the block.
Title: Keeping Track of Plotting Paper
Post by: dubb on January 27, 2005, 04:06:18 PM
great...ive loaded this routine. but how do load it in cad...do i just copy the code and save it as plotlog.lsp and load it in cad? i had done it this way, but it seems like its not writing the file plotlog.txt. althogh i have already changed the G:\ to my drive on the network. is this the right way?
Title: Keeping Track of Plotting Paper
Post by: danny on January 27, 2005, 06:20:19 PM
I'm stuck too!  What CAD version are you using?
Title: Keeping Track of Plotting Paper
Post by: dubb on January 27, 2005, 07:04:00 PM
im using 2004
Title: Keeping Track of Plotting Paper
Post by: danny on January 27, 2005, 07:08:24 PM
mee too..
I've loaded the lisp and I got the dcl in the search path, but the command needs a newdate2 block.  Thats as far as I got.  No plotlog.txt yet.
Title: Keeping Track of Plotting Paper
Post by: dubb on February 03, 2005, 01:25:21 PM
has anybody took a look at this one? i wish i knew enough to get this program working. it seems like  a very useful tool.
Title: Keeping Track of Plotting Paper
Post by: whdjr on February 04, 2005, 09:14:45 AM
It's never gonna work without the block that is missing.  The program is missing "NEWDATE2" block that has attributes in it the code retreives.  If you don't have the block then you should probably contact the author and ask about the block.  The author's name is at the beginning of the code. :)
Title: Keeping Track of Plotting Paper
Post by: Craig on February 05, 2005, 12:07:03 AM
I'm so sorry guys, the program was posted for you to make adjustments to fit your own needs. I'm sorry about this...my bad.
Title: Keeping Track of Plotting Paper
Post by: Craig on February 05, 2005, 12:14:18 AM
Okay, here is a link to the file.
http://www.theswamp.org/lilly_pond/craig/newdate2.dwg?nossi=1

We have a program when we setup our drawings that will automatically insert the newdate2.dwg file onto our plot sheets. You can write one yourself or insert it manually to see the program work. Again, my bad on that. I posted that awhile back....you did some digging to find it, November 3rd, 2003  :D
Title: Keeping Track of Plotting Paper
Post by: Craig on February 05, 2005, 12:16:35 AM
BTW, do understand it's setup to gather our job number, sheet size, date and a few other items. You have to customize for your own needs.

Also, you will need to create a plotlog.txt file and put it in a path you specify within your own network. Look for the follwing lines within the code and you will have to adjust to fit your requirements.

(setq fil1 (open "H:\plotlog.txt" "a"))

In our text file we keep this header across the top:
Job Number - Paper Used - Sheet Size - Square Feet - Month - Day - Year - Task Number
Title: Keeping Track of Plotting Paper
Post by: Craig on February 05, 2005, 12:27:37 AM
Make sure when doing this you will have two programs, plotlog.lsp and plotlog.dcl. The DCL file is this:
Code: [Select]
dcl_settings : default_dcl_settings { audit_level = 3; }

plotlog : dialog {
    label = "Plot Log";
    : boxed_row {
        label = "Check your HPCONFIG";
        : button {
            label = "No";
            mnemonic = "N";
            key = "no";
        }
        : button {
            label = "Yes";
            mnemonic = "Y";
            key = "yes";
        }
    }
    : boxed_radio_row {
        label = "Select Paper Grade";
        mnemonic = "S";
        : radio_button {
            label = "Bond";
            mnemonic = "B";
            key = "bond";
            is_enabled = false;
        }
        : radio_button {
            label = "Vellum";
            mnemonic = "V";
            key = "vellum";
            is_enabled = false;
        }
        : radio_button {
            label = "Mylar";
            mnemonic = "M";
            key = "mylar";
            is_enabled = false;
        }
    }
    : boxed_row {
        label = "Select Task Number";
        mnemonic = "T";
        : radio_row {
            value = "Tsk";
            : radio_button {
                label = ".0";
                key = "0";
                is_enabled = false;
            }
            : radio_button {
                label = ".1";
                key = "1";
                is_enabled = false;
            }
            : radio_button {
                label = ".2";
                key = "2";
                is_enabled = false;
            }
            : radio_button {
                label = ".3";
                key = "3";
                is_enabled = false;
            }
            : radio_button {
                label = ".4";
                key = "4";
                is_enabled = false;
            }
            : radio_button {
                label = ".5";
                key = "5";
                is_enabled = false;
            }
            : radio_button {
                label = "Other";
                mnemonic = "O";
                key = "other";
                is_enabled = false;
            }
        }
    }
    : boxed_row {
        alignment = right;
        fixed_width = true;
        width = 10;
        : edit_box {
            label = "Task Number";
            mnemonic = "I";
            key = "insert";
            alignment = centered;
            fixed_width = true;
            width = 10;
            is_enabled = false;
        }
    }
    : row {
        key = "YN";
        alignment = centered;
        fixed_width = true;
        width = 27;
        : button {
            label = "Add to Plotlog";
            mnemonic = "A";
            key = "ok";
            fixed_width = true;
            width = 10;
        }
        : button {
            label = "Skip Plotlog";
            mnemonic = "S";
            key = "cancel";
            fixed_width = true;
            is_cancel = true;
            width = 5;
            is_default = true;
        }
    }
}

The other should be saved as plotlog.lsp
Title: Keeping Track of Plotting Paper
Post by: Craig on February 05, 2005, 07:48:40 AM
I just thought about this as well this early Saturday morning, we have our plot button/icon setup as such:

^C^Cplotlog;_plot

That way, you force the user to activate the plotlog.lsp first and then after they hit OK or Cancel it will go onto the regular plot dialogue.

The other thing about the plotlog.dcl, this is custom to what our needs are so what we do is select the paper we're using and the task number, being one job number for us might have 3-4 tasks under...ex. would be a job number 25001 and in the plotlog it would show up as 25001 or 25001.0, can't remember  :oops: , and if we have some other task under 25001 we would select the number given it and in the plotlog file you would see 25001.3, 25001.4 etc...

Hope this helps most of you out.
Title: Keeping Track of Plotting Paper
Post by: dubb on February 08, 2005, 03:15:12 PM
what content does the "newdate2.dwg" file contain?

rtext? attribute?

when i plot, does another dialogue pop up as well as the normal autocad dialogue.?

in cad 2004 there isnt an hp config, is there a replace for that?
Title: Keeping Track of Plotting Paper
Post by: Craig on February 17, 2005, 10:45:35 PM
File contains attributes

Yes, the plotlog.dcl file will pop-up if you tell it to, but thats the whole point of the tracking.

Like I stated before, under your Print button, place this code:
^C^Cplotlog;_plot
Title: Keeping Track of Plotting Paper
Post by: Craig on February 17, 2005, 10:50:17 PM
I was wondering why you brought up HPCONFIG but we don't use it. This plot routine was for R14 but I changed it some for R2002.

In the LSP file you might want to remove these lines:
 
Code: [Select]
(action_tile "no" "(progn(setq dm $key)(activate))")
  (action_tile "yes" "(progn(setq dm $key)(go_hpconfig)(activate))")


and remove the function go_hpconfig:
Code: [Select]
(defun go_hpconfig ()
  (c:hpconfig)
  );;end defun go_hpconfig


Also, in the DCL file remove:
Code: [Select]
: boxed_row {
        label = "Check your HPCONFIG";
        : button {
            label = "No";
            mnemonic = "N";
            key = "no";
        }
        : button {
            label = "Yes";
            mnemonic = "Y";
            key = "yes";
        }
    }


It should not effect your program but I will investigate here in a few to make sure all goes well
Title: Keeping Track of Plotting Paper
Post by: Craig on February 17, 2005, 11:03:11 PM
Even better, here is our latest code you can replace the older one with. This one has also been re-written to ignore the program altogether if the NEWDATE stamp is missing. Basically, the box won't pop-up when we try to plot drawings we get from architects.

Plotlog.lsp
Code: [Select]
;;; plotlog.lsp
;;; Usage: This routine was designed to keep a log of all plots by writing the
;;; selections to a text file at H:\plotlog.txt. It inserts the following into
;;; the plot log:
;;; Job Number - Paper Used - Sheet Size - Square Feet - Month - Day - Year - Task Number
;;;
;;; Written By: Craig Boggan
;;; Created: February 12, 2003
;;;
;;; Updated: April 30, 2003
;;;          Added task number to job number
;;; Updated: September 1, 2004
;;;          Added the lines of code to ignore entire program if the newdate block is not on the drawing
;;;          This keeps from having to select an extra box when plotting architects drawings just for viewing
;;;
;;; CAD Program(s) Tested: AutoCAD 14+
;;;
(defun c:plotlog (/ cmd paper billable cm dm task oPlot number_plots)
 
  (setq ndate (ssget "x" '((0 . "INSERT") (2 . "NEWDATE2"))))
  (if (= ndate nil)
    (no_date1)
    (plog)
    );;end if
  (princ)
  );;end plotlog

(defun no_date1 ()
  (princ "Drawing not setup to use Plotlog ")
  );;end defun no_date

(defun plog ()
  (VL-LOAD-COM)
  (OR KBSG:ACADAPP (SETQ KBSG:ACADAPP (VLAX-GET-ACAD-OBJECT)))
  (OR KBSG:ACTIVEDOC (SETQ KBSG:ACTIVEDOC (VLA-GET-ACTIVEDOCUMENT KBSG:ACADAPP)))
  (setq oPlot (vla-get-plot KBSG:ACTIVEDOC ))
  (vlax-dump-object oPlot T)
  (setq number_plots (vla-get-NumberofCopies oPlot))
  (setq cmd (getvar "cmdecho"))
  (setvar "cmdecho" 0)
;;;;;;Begin dialog box
  (setq dcl_id (load_dialog "plotlog.dcl"))
  (if (not (new_dialog "plotlog" dcl_id))
    (exit);;if dialog not found..exit
  );;end if
  (action_tile "bond" "(setq paper $key)")
  (action_tile "vellum" "(setq paper $key)")
  (action_tile "mylar" "(setq paper $key)")
  (action_tile "0" "(setq task $key)")
  (action_tile "1" "(setq task $key)")
  (action_tile "2" "(setq task $key)")
  (action_tile "3" "(setq task $key)")
  (action_tile "4" "(setq task $key)")
  (action_tile "5" "(setq task $key)")
  (action_tile "other" "(progn(setq insert_other $key)(activate_other))")
  (action_tile "insert" "(setq task $value)")
  (action_tile "cancel" "(progn(setq cm $key)(done_dialog))")
  (action_tile "ok" "(progn(setq cm $key)(done_dialog))")
  (start_dialog)
  (unload_dialog dcl_id)
;;;;;;End dialog box
  (if (= cm "cancel")
    (princ "\nPlotlog aborted by user ")
    );;end if
  (if (= cm "ok")
    (check_newdate2);;if OK is selected on dialog box go to sub-routine check_newdate2
    );;end if
  (setvar "cmdecho" cmd)
  (princ)
  );;end defun plotlog
 

;;-------------------------------------------------------------
;; This checks to make sure the newdate stamp is on the drawing
;; before going any further. If it's not found, the program will
;; end with no errors showing across the command line
;;--------------------------------------------------------------
(defun check_newdate2 (/ find_block)
  (setq find_block (ssget "x" '((0 . "INSERT") (2 . "NEWDATE2"))))
  (if (= find_block nil)
    (alert "\nNewdate block not found...Exiting ")
    );;end if
  (if (/= find_block nil)
    (check_box)
    );;end if
  );;end defun check_newdate2

(defun go_hpconfig ()
  (c:hpconfig)
  );;end defun go_hpconfig

;;-------------------------------------------------------------
;; This checks to see which radio buttons were selected on the

;; dialog box and sets the appropriate values
;;--------------------------------------------------------------
(defun check_box ()
  (if (= paper "bond")
    (progn
      (setq paper "Bond")
      (start_plotlog)
      );;end progn
    );;end if
  (if (= paper "vellum")
    (progn
      (setq paper "Vellum")
      (start_plotlog)
      );;end progn
    );;end if

  (if (= paper "mylar")
    (progn
      (setq paper "Mylar")
      (start_plotlog)
      );;end progn
    );;end if
  );;end defun check_box


;;---------------------------------------------------------
;; This is section is where the program gathers most of its
;; data and writes it to a plotlog text file
;;---------------------------------------------------------
(defun start_plotlog (/ dwg_name   check_date job_number index
fb1   fb2      sheet_size count
sheet_length      sheet1 sheet2
square_feet      plotlog_line
fil   f      date1 year
month   day      date2 time
time1   time2      time3
      )
  (repeat number_plots
  (setq dwg_name (getvar "dwgname"))
  (setq check_date (substr dwg_name 1 1));;this finds out if it was in 1999 or 2000+
  (if (= check_date "9")
    (setq job_number (strcat "9" (substr dwg_name 2 4)));;this creates the job number
    );;end if
  (if (= check_date "0")
    (setq job_number (strcat "2" (substr dwg_name 2 4)));;this creates the job number
    );;end if
  (setq index 0)
  (setq fb1 (entget (ssname find_block index)));;gets first list from block
  (setq fb2 (entget(entnext(entnext(entnext(cdr(assoc -1 fb1)))))));;gets sub-list from same block to find sheet size
  (setq sheet_size (cdr(assoc 1 fb2)))
  ;;---------------------------------------------------------
  ;; This section find the "," between the sheet size numbers
  ;;---------------------------------------------------------
  (setq sf sheet_size
     count 1
);end setq
(while
 (not
   (wcmatch (substr sf count 2) "*`,")
 );end not

  (setq count (1+ count))
);end while
  ;;-------------------------
  ;; End of searching for ","
  ;;-------------------------
  (setq sheet_length (strlen sheet_size));;total length of sheet size extracted
  (setq sheet1 (*(atof(substr sheet_size 1 count))));;extracts out first number
  (setq sheet2 (atof(substr sheet_size (+ count 2) sheet_length)));;extracts out second number
  (setq square_inch (/(* sheet1 sheet2)12));;multiplies two sheet numbers then divides by 12 to get square inch
  (if (= paper "Bond")
    (setq price (strcat "$"(rtos(* square_inch 0.047)2 2)))
    );;end if
  (if (= paper "Vellum")
    (setq price (strcat "$"(rtos(* square_inch 0.11)2 2)))
    );;end if
  (if (= paper "Mylar")
    (setq price "Unknown")
    );;end if
  (setq square_feet (rtos(/(* sheet1 sheet2)12)))
  (setq sheet_size (strcat (rtos sheet1 2 0)"x"(rtos sheet2 2 0)))
  (setq date1 (rtos(getvar "cdate")2 0))
  (setq year (substr date1 1 4));; Extracts out the year from the CDATE variable
  (setq date1 (substr date1 5 8))
  (setq month (substr date1 1 2));; Extracts out the month by number from the CDATE variable
  ;; Check what month is active at the time of extraction
  (if (= month "01")
    (setq month "January")
  )
  (if (= month "02")
    (setq month "February")
  )
  (if (= month "03")
    (setq month "March")
  )
  (if (= month "04")
    (setq month "April")
  )
  (if (= month "05")
    (setq month "May")
  )
  (if (= month "06")
    (setq month "June")
  )
  (if (= month "07")
    (setq month "July")
  )
  (if (= month "08")
    (setq month "August")
  )
  (if (= month "09")
    (setq month "September")
  )
  (if (= month "10")
    (setq month "October")
  )
  (if (= month "11")
    (setq month "November")
  )
  (if (= month "12")
    (setq month "December")
  )
  (setq day (substr date1 3 4));; Extracts out the day from the CDATE variable
  (setq time1 (rtos(getvar "cdate")2 4))
  (setq time2 (strlen time1))
  (setq time3 (substr time1 (- time2 3) time2))
  (setq time (strcat(substr time3 1 2)":"(substr time3 3 4)))
  (setq job_task_number (strcat job_number "." task))
  (setq plotlog_line (strcat job_task_number "," paper "," sheet_size "," square_feet "," month " " day " " year "," time "," price))
 
  (setq fil1 (open "h:/plotlog.txt" "a"))
  ;(setq fil (getfiled "Select Plot Log file :" "h:\plotlog" "txt" 8))
  (if (= fil1 nil)
    (progn
      (princ "\nPlotlog.txt is missing from H:\ drive ")
      (exit)
      );;end progn
    );;end if
  ;(setq f (open fil "a"))
  (write-line plotlog_line fil1)
  (close fil1)
    );;end repeat
  );;end defun start_plotlog

(defun activate ()
 (if (/= dm nil);if selected
   (progn
     (mode_tile "bond" 0);enable
     (mode_tile "vellum" 0);enable
     (mode_tile "mylar" 0);enable
     (mode_tile "0" 0);enable
     (mode_tile "1" 0);enable
     (mode_tile "2" 0);enable
     (mode_tile "3" 0);enable
     (mode_tile "4" 0);enable
     (mode_tile "5" 0);enable
     (mode_tile "other" 0);enable
     );;end progn
   );;end if
);end activate

(defun activate_other ()
  (if (/= insert_other nil);if selected
    (progn
      (mode_tile "insert" 0);enable
      )
    (progn
      (mode_tile "insert" 1);disable
      )
   );;end if
);end activate_other

(defun deactivate ()
  (mode_tile "insert" 1)
  );;end defun deactivate


Plotlog.dcl
Code: [Select]
dcl_settings : default_dcl_settings { audit_level = 3; }

plotlog : dialog {
    label = "Plot Log";
    : boxed_radio_row {
        label = "Select Paper Grade";
        mnemonic = "S";
        : radio_button {
            label = "Bond";
            mnemonic = "B";
            key = "bond";
        }
        : radio_button {
            label = "Vellum";
            mnemonic = "V";
            key = "vellum";
        }
        : radio_button {
            label = "Mylar";
            mnemonic = "M";
            key = "mylar";
        }
    }
    : boxed_row {
        label = "Select Task Number";
        mnemonic = "T";
        : radio_row {
            value = "Tsk";
            : radio_button {
                label = ".0";
                key = "0";
            }
            : radio_button {
                label = ".1";
                key = "1";
            }
            : radio_button {
                label = ".2";
                key = "2";
            }
            : radio_button {
                label = ".3";
                key = "3";
            }
            : radio_button {
                label = ".4";
                key = "4";
            }
            : radio_button {
                label = ".5";
                key = "5";
            }
            : radio_button {
                label = "Other";
                mnemonic = "O";
                key = "other";
            }
        }
    }
    : boxed_row {
        alignment = right;
        fixed_width = true;
        width = 10;
        : edit_box {
            label = "Task Number";
            mnemonic = "I";
            key = "insert";
            alignment = centered;
            fixed_width = true;
            width = 10;
            is_enabled = false;
        }
    }
    : row {
        key = "YN";
        alignment = centered;
        fixed_width = true;
        width = 27;
        : button {
            label = "Add to Plotlog";
            mnemonic = "A";
            key = "ok";
            fixed_width = true;
            width = 10;
        }
        : button {
            label = "Skip Plotlog";
            mnemonic = "S";
            key = "cancel";
            fixed_width = true;
            is_cancel = true;
            width = 5;
            is_default = true;
        }
    }
}

Title: Keeping Track of Plotting Paper
Post by: dubb on February 18, 2005, 12:52:57 PM
O THANKS,

Code: [Select]
Command: PLOTLOG ; IAcadPlot: The set of methods and properties used for
plotting layouts
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00af9594>
;   BatchPlotProgress = 0
;   NumberOfCopies = 1
;   QuietErrorMode = 0
; Methods supported:
;   DisplayPlotPreview (1)
;   PlotToDevice (1)
;   PlotToFile (2)
;   SetLayoutsToPlot (1)
;   StartBatchMode (1)
; error: bad argument type: lentityp nil


I GET THIS ERROR MESSAGE WHEN I RUN THE ROUTINE... WHAT INFORMAITON IS IN THE NEWDATE2 STAMP. DOES THE ROUTINE CALLED FOR ANYTHING FROM THE NEWDATE2 STAMP?

WILL THIS WORK ON 2004
Quote
(defun go_hpconfig ()
  (c:hpconfig)
  );;end defun go_hpconfig
Title: Keeping Track of Plotting Paper
Post by: sinc on February 18, 2005, 02:13:49 PM
Quote from: danny
I've been looking around for such a program that will track plots also.  All I was looking for is who plotted it, what kind & size of paper, when/time, and of course job #.  

Trying to wade through this mess of posts, I didn't see anyone mention Autocad's built-in plot log, which does exactly this.

In the Plot dialog box on the Plot Device pane, click on "Plot Stamp Settings", then "Advanced", then check "Create a log file".  It creates a file like this:

Code: [Select]
S:\EJSI-Projects\Current\0316 05-07 Ridgeview CC4 CC5 BP1\dwg\031607_ALTA_LOT4.dwg,ALTA,2/17/2005 3:33:52 PM,Richard Sincovec,\\EJSI-SERVER\HP DesignJet 800 42,Arch D - 24 x 36 in. (landscape),1:1,
S:\EJSI-Projects\Current\0316 05-07 Ridgeview CC4 CC5 BP1\dwg\031607_ALTA_LOT3.dwg,ALTA,2/17/2005 4:06:30 PM,Richard Sincovec,\\EJSI-SERVER\HP DesignJet 800 42,Arch D - 24 x 36 in. (landscape),1:1,
S:\EJSI-Projects\Current\0479 Creekside Office Park\dwg\0479_PLAT.dwg,(1),2/17/2005 4:42:13 PM,Richard Sincovec,\\EJSI-SERVER\HP DesignJet 800 42,Arch D - 24 x 36 in. (landscape),1:1,
S:\EJSI-Projects\Current\0479 Creekside Office Park\dwg\0479_PLAT.dwg,(2),2/17/2005 4:47:06 PM,Richard Sincovec,\\EJSI-SERVER\HP DesignJet 800 42,Arch D - 24 x 36 in. (landscape),1:1,

It might be a little hard to read in the code window here in the Swamp (it's much easier in Notepad), but the fields in each line are Drawing Name, Layout Tab Name, Date/Time, User, Plotter (or PC3), Paper size, and Plot Scale.
Title: Keeping Track of Plotting Paper
Post by: ELOQUINTET on February 18, 2005, 03:17:36 PM
craig need a little help here. i was trying to get this to work and not sure what's wrong. i got the lsp and dcl and changed the path to my destination which is in my search path. i downloaded the newdate2.dwg. i am trying to print from this drawing and it says "Drawing not setup to use Plotlog". what do you think i am doing wrong?
Title: Keeping Track of Plotting Paper
Post by: ELOQUINTET on February 18, 2005, 03:18:56 PM
o yeah i setup my plot button like you said too.
Title: Keeping Track of Plotting Paper
Post by: Craig on February 18, 2005, 03:45:55 PM
One thing is the NEWDATE.DWG file HAS to be on the drawing for this to work. Here is a screenshot of what ours looks like on the drawing.
(http://www.theswamp.org/screens/craig/newdate.gif)
Title: Keeping Track of Plotting Paper
Post by: Craig on February 18, 2005, 03:48:20 PM
As you can see the \04013S01.DWG is our drawing number and the first 5 numbers is also the project number. Thats what it extracts out for the Job Number within the text file. Let me look and see if I can come up with a bit more that can help you out.

Understand, this is really for a starting place and you "MIGHT" have to adjust the code to fit your own needs since your drawings maynot be setup the same.

Be back
Title: Keeping Track of Plotting Paper
Post by: dubb on February 18, 2005, 03:53:37 PM
Quote from: Craig
As you can see the \04013S01.DWG is our drawing number and the first 5 numbers is also the project number. Thats what it extracts out for the Job Number within the text file. Let me look and see if I can come up with a bit more that can help you out.

Understand, this is really for a starting place and you "MIGHT" have to adjust the code to fit your own needs since your drawings maynot be setup the same.

Be back

o i c i just read that the stamp is an attribute. as for customizing have similar file naming structure as you. except my drawings are like "05-555S20 (FOR A FOUNDATION PLAN)"  and so forth. and as for modifying the code...i would probably have to change the attribute tags and the directory "H:/" to read "S:/"

the plot dialogue appears but the plotlog.txt doesnt have anything written in it. thank you for this code. btw..how did you get this one, did u make it yourself?
Title: Keeping Track of Plotting Paper
Post by: Craig on February 18, 2005, 04:03:32 PM
My suggestion as I look more and more at this, there are too many factors on our system that I could post all the different code and it work exactly like you need it to. We have a program that places the NEWDATE.DWG on the drawing but it's running through another program that has to do with the setup of the drawing. All this was implemented before I ever came here and I just adjusted everything to what was already in place. Overall there are about 4 different programs that revolve around this NEWDATE thing. My suggestion is to write you a small program that will place the block on your drawing where you want it with informtaion like I supplied in the screenshot. I thougt I could be more help but every time I opened one file, two more were required and I could never explain it all.

Below is another program that can store our drawings for us in the correct folder using the project number and update the NEWDATE.DWG stamp to the current date when you do the save. Maybe you can find a wayt o get it to work how you want it...wish I could do more.

Code: [Select]
;;; filestore.lsp
;;; Usage: This routine was designed to save open drawing file to local computer then copy
;;; the same drawing file to the server in the correct location. This was created to replace
;;; the existing STORE command which would not run under AutoCAD 2000+
;;;
;;; Written By: Craig Boggan
;;; Created: November 17, 2003
;;;
;;;
;;; CAD Program(s): AutoCAD 2002+
;;;
;;; Creating toolbar button command should be as follows: ^C^Cqsave;_filestore;
;;;
(defun c:filestore (/     doc      fn       dn nn
   date1    year     month    time1 time2
   time3    n_date   ndate1   ndate2 ndate_date
   getatt   addatt   insrtatt check message
  )
  (vl-load-com)
  (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
  (setq
    fn (vlax-get-property doc 'FullName)
    dn (vlax-get-property doc 'Name)
    nn (strcase
(strcat "h:\\" (substr dn 1 2) "\\" (substr dn 1 5) "\\" dn)
       )
  )
  (setq ndate_title (strcat "\\" dn))
  (setq date1 (rtos (getvar "cdate") 2 0)
year  (substr date1 3 2);; Extracts out the year from the CDATE variable
date1 (substr date1 5 8)
month (substr date1 1 2);; Extracts out the month by number from the CDATE variable
day   (substr date1 3 4);; Extracts out the day from the CDATE variable
;;; This potion will extract out the time
time1 (rtos (getvar "cdate") 2 4)
time2 (strlen time1)
time3 (substr time1 (- time2 3) time2)
time  (strcat (substr time3 1 2) ":" (substr time3 3 4))
;;;End of time extraction
  )
  (setq n_date (strcase (strcat ndate_title
","
month
"-"
day
"-"
year
" AT "
(substr time3 1 2)
":"
(substr time3 3 4)
" - CRAIG"
)
      )
  );;This creates a string of all variables together to place on the Newdate stamp
  (setq ndate (ssget "x" '((0 . "INSERT") (2 . "NEWDATE2"))));;This finds the newdate stamp and places it as a variable
  (setq index 0)
  (setq ndate1 (entget (ssname ndate index)));;Extracting out the list of the Newdate stamp
  (setq ndate2 (ssname ndate index));;Gets ssname of stamp for later use so it can be updated by entupd
  (setq ndate_date (entget (entnext (cdr (assoc -1 ndate1)))));;This extracts the list for the first attribute
  (setq getatt (assoc 1 ndate_date));;Extracts out the first line in the Newdate stamp
  (setq addatt (cons 1 n_date));;Setting up to replace the first line in the Newdate stamp
  (setq insrtatt (subst addatt getatt ndate_date));;Substituting variables to show new date, time, etc...
  (entmod insrtatt);;Modify attribute in Newdate stamp
  (entupd ndate2);;Update Newdate stamp
  (setq check (findfile nn))
  (if (= check nil)
    (progn
      (alert "File not found on server. Start copy process ")
      (vl-file-copy fn nn)
      );;progn
    );;end if
  (if (/= check nil)
    (progn
      (princ "\nRemoving previous file ")
      (vl-file-delete nn);;Deletes original file on server so new one can be copied over
      (princ "\nStoring new file ")
      (vl-file-copy fn nn);;Copy drawing file to server
      );;progn
    );;end if
  ;;Copies new updated file on local computer to server
   (setq message (strcat "\nFile Stored...H:\\" (substr dn 1 2) "\\" (substr dn 1 5) "\\" dn))
  ;;(prompt "File Stored... ")
   (princ message)
  (princ)
);;end defun filestore.lsp
Title: Keeping Track of Plotting Paper
Post by: Craig on February 18, 2005, 04:07:48 PM
Quote from: dubb
o i c i just read that the stamp is an attribute. as for customizing have similar file naming structure as you. except my drawings are like "05-555S20 (FOR A FOUNDATION PLAN)"  and so forth. and as for modifying the code...i would probably have to change the attribute tags and the directory "H:/" to read "S:/"

the plot dialogue appears but the plotlog.txt doesnt have anything written in it. thank you for this code. btw..how did you get this one, did u make it yourself?


Yes, I wrote this about 2 years ago to keep from having to keep up with plots by having to write them down by hand (which I've done before and it's no fun).

For the text file, make sure the path statment in the LSP is pointing to the correct location, being ours is on H:\
Title: Keeping Track of Plotting Paper
Post by: dubb on July 11, 2005, 01:58:55 PM
im back on this topic again...since i had made the plot tracking lisp routine....somehow people bypass it making this a routine that is not effective...i would like to make this routine so that you cannot cancel it..or maybe you can cancel it but it will silently get as much data as it can and print out that this person didnt log the plot log the correct way...can anyone help me? ill post the code in my the pond...btw anyone can download this routine..ill include the .dcl file. thanks
Title: Keeping Track of Plotting Paper
Post by: dubb on July 11, 2005, 02:03:19 PM
lisp file
http://www.theswamp.org/lilly_pond/dubb/plog/plog.LSP?nossi=1

.dcl file
http://www.theswamp.org/lilly_pond/dubb/plog/plog.DCL?nossi=1