+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    spanky
    Guest

    Default Prompting a user for key info....

    Registered forum members do not see this ad.

    Help! Does anyone know how to prompt a user upon opening a new drawing?

    i'm looking for something along the same lines as the dialog box you get when you insert a block with attributes but without having to get the user to insert a block (which they would undoubtedly forget to do).

    the idea is that when a new drawing is started key details such as an order number, reference, date and draftsmen's name etc. and then this information will be inserted into the layout in paper space.

    any thoughts?

    Perhaps, using VB to insert a worldblock of the standard layout which would then prompt for attributes or something?

    Or am i missing something really simple?

  2. #2
    Super Member
    Using
    Architectural DT 2007
    Join Date
    Dec 2002
    Location
    London
    Posts
    1,087

    Default

    Yeh sounds like youd need VB scripts to run at start up,god knows how,just starting to learn VB myself.Don't the users just have a title block they insert and fill in their relevant attributes?Thats what we tend to do.

  3. #3
    Super Moderator fuccaro's Avatar
    Using
    AutoCAD 2006
    Join Date
    Nov 2002
    Location
    Romania, Marosvasarhely
    Posts
    3,540

    Default

    How about a date stamp? You mai insert the "loginname" and the plot date and time using diesel expressions. Just make a search in this Forum for "date stamp".
    It's nice to be nice, but sometimes is nicer to be evil!.
    Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.

  4. #4
    spanky
    Guest

    Default Prompting a user for key info....

    i'm fairly conversant with VB so i'll try that, not sure if the datestamp will have enough info - any more ideas anyone??

  5. #5
    Super Moderator fuccaro's Avatar
    Using
    AutoCAD 2006
    Join Date
    Nov 2002
    Location
    Romania, Marosvasarhely
    Posts
    3,540

    Default just an oppinion

    Registered forum members do not see this ad.

    Here is a short lisp routine to insert in a new drawing some information. Place the routine in the startup suite so it will start with every drawing. It will ask the needed information just once in a drawing.
    You should modify the way the data is displayed to meet your needs, I presented just a sample.
    Code:
    (defun starting( / today name ins tx)
      (if (zerop (getvar "useri1"))
        (progn
          (setq today (menucmd "M=$(edtime, $(getvar, date),MO/DD/YY)"))
          (textpage)
          (setq name (getstring "\nHello drafter! Who are you? "))
          (setvar "useri1" (getint "\nproject number please..."))
          (graphscr)
          (setq ins (getpoint "\ntext insertion point ...")
    	    tx (list
    	     (cons 0 "TEXT")
    	     (cons 1 (strcat ">>> date:" today
    			     "     project: " (itoa (getvar "useri1"))
    			     "     drafter&#58; " name " <<<"&#41;&#41;
    	     &#40;list 10 &#40;car ins&#41; &#40;cadr ins&#41; &#40;caddr ins&#41;&#41;
    	     &#40;cons 40 2.5&#41;&#41;
    	    &#41;
          &#40;entmake tx&#41;&#41;&#41;
      &#40;princ&#41;
      &#41;
    &#40;starting&#41;
    It's nice to be nice, but sometimes is nicer to be evil!.
    Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts