Results 1 to 10 of 10

Thread: Filling in a title block from dialog box input?

  1. #1
    Member
    Join Date
    2008-11
    Posts
    6
    Login to Give a bone
    0

    Post Filling in a title block from dialog box input?

    I'm tring to fill out the title block on six layout tabs at once. I made a dialog box to allow a user to input there information into and I'm not sure on how to get that information to fill in the title blocks. Can Anyone help me solve this as I'm new to lisp programing? Thank you for helping.
    Attached Files Attached Files
    • File Type: dcl 1.DCL (1.7 KB, 28 views)

  2. #2
    Active Member
    Join Date
    2007-03
    Location
    Huntingdon, TN
    Posts
    97
    Login to Give a bone
    0

    Default Re: Filling in a title block from dialog box input?

    Could you use sheet set manager to do what you are talking about and not have to recreate the wheel? Then you would have a little more power than just filling out the title block. I could be misunderstanding what you want or you may not be able to us SSM. Sorry if that is the case. If you are able to use it I would check it out before continuing on with your lisp routine.

  3. #3
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Filling in a title block from dialog box input?

    Hi, aaron.bentley
    Upload your title block here, please,
    to see what are exact tags in this block
    and remove the unused info before
    Hope I could help

    ~'J'~

  4. #4
    Member
    Join Date
    2008-11
    Posts
    6
    Login to Give a bone
    0

    Post Re: Filling in a title block from dialog box input?

    Anthony Rhodes, I'm not familiar with sheet set manager so I don't know if that would be easier to do or not?

  5. #5
    Member
    Join Date
    2008-11
    Posts
    6
    Login to Give a bone
    0

    Post Re: Filling in a title block from dialog box input?

    fixo, Here is the title blocks I'm trying to fill in. The Dialog box shows which values I need to stay the same between drawings. Thanks for your help. Aaron
    Attached Files Attached Files

  6. #6
    Active Member
    Join Date
    2007-03
    Location
    Huntingdon, TN
    Posts
    97
    Login to Give a bone
    0

    Default Re: Filling in a title block from dialog box input?

    Aaron,
    There is nothing on your title block that SSM could not handle. You will have to rework your title block a little but it is nothing you could not handle since you are cabable of making your own dialog box to do the same thing. I would look it up under help.

    Good Luck,

  7. #7
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Filling in a title block from dialog box input?

    Quote Originally Posted by aaron.bentley View Post
    fixo, Here is the title blocks I'm trying to fill in. The Dialog box shows which values I need to stay the same between drawings. Thanks for your help. Aaron
    Hi again

    Try this one

    Code:
    (defun C:tit  (/ dcl_id)
    
      (setq dcl_id (load_dialog "1.dcl"))
      (if (not (new_dialog "title" dcl_id))
        (exit))
    
      (action_tile "revison" "(setq revno $value)")
      (action_tile "Job Number" "(setq jobno $value)")
      (action_tile "by" "(setq by $value)")
      (action_tile "Date" "(setq dat $value)")
    ;;;  (action_tile "order" "(setq ord $value)");<-- not used in this block
      (action_tile "Description" "(setq desc $value)")
      (action_tile
        "cancel"
        "(done_dialog) (setq userclick nil)"
        )
    
      (action_tile
        "accept"
        "(done_dialog)(setq userclick T))"
        )
      (setq check (start_dialog))
      (unload_dialog dcl_id)
      (if userclick
        (progn
          (vl-load-com)
          (or adoc
    	  (setq	adoc
    		 (vla-get-activedocument
    		   (vlax-get-acad-object)
    		   )
    		)
    	  )
    
          (vlax-for	layout	(vla-get-layouts adoc)
    	(vlax-for obj  (vla-get-block layout)
    	  (if (and
    		(eq "AcDbBlockReference" (vla-get-objectname obj))
    		(eq "STATUS" (vla-get-name obj)))
    	    (progn
    	      (setq atts (vlax-invoke obj 'GetAttributes))
    	      (foreach at  atts
    		(cond
    
    		  ((eq "REVISION" (strcat (vla-get-tagstring at)))
    		   (vla-put-textstring at revno))
    		  ((eq "JOB_NUMBER1" (strcat (vla-get-tagstring at)))
    		   (vla-put-textstring at jobno))
    		  ((eq "DRAFTER1" (strcat (vla-get-tagstring at)))
    		   (vla-put-textstring at by))
    		  ((eq "DATE2" (strcat (vla-get-tagstring at)))
    		   (vla-put-textstring at dat))
    		  ((eq "DESCRIPTION1" (strcat (vla-get-tagstring at)))
    		   (vla-put-textstring at desc))
    		  (T nil)))))))))
    
      (vla-regen adoc acallviewports)
      (princ)
      )
    ~'J'~

  8. #8
    Member
    Join Date
    2008-11
    Posts
    6
    Login to Give a bone
    0

    Post Re: Filling in a title block from dialog box input?

    Anthony,
    Thank you....I will learn something new today!!

    fixo,
    It worked great! How would you add in the JOB_NAME and ORDER_NUMBER since they are in a different block and keep it in one command?

  9. #9
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Filling in a title block from dialog box input?

    Add JOB_NAME and ORDER_NUMBER in the cond statement
    as in my code and add tem both in the action_tile
    statement accordingly
    Follow the code above
    If you can't I should do it just tomorrow

    ~'J'~

  10. #10
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Filling in a title block from dialog box input?

    As an alternative, from your dialog, you could have it write to the drawing custom properties and then have fields within the title block that read from the drawing custom properties. We dont use sheet manager in our office, probably mostly because when it was first introduced, if the field was part of a text object within the block, it wouldnt update automatically when a change was made. It would only update right away if it was an attribute that contained the field (which increased the chance that someone could erase the field and break the link.) It may have been fixed by now, but because of these short comings, we created a program that uses excel and the custom drawing properties to fill in our title blocks.

Similar Threads

  1. Replies: 2
    Last Post: 2008-12-03, 01:17 PM
  2. Replies: 2
    Last Post: 2006-11-30, 06:16 AM
  3. Replies: 6
    Last Post: 2006-10-16, 05:29 AM
  4. Convert MDT Title Block to Inventor 10 Title Block
    By julesgordon in forum Inventor - General
    Replies: 1
    Last Post: 2005-07-18, 08:34 PM
  5. Title Block - Dialog Box
    By zorroxxxx in forum AutoCAD General
    Replies: 1
    Last Post: 2005-05-19, 02:29 AM

Posting Permissions

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