Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Titleblock help

  1. #1
    Member
    Join Date
    2008-05
    Posts
    25

    Default Titleblock help

    Goal: Create a titleblock to insert that automatically calculates the necessary scale, changes all necessary settings accordingly, inserts titleblock and doesn't explode it, and then prompts user for input to fill out the titleblock.

    Problems: Previous titleblocks have been exploded and users accidentally move pieces of the titleblock or have problems removing them if they need to replace w/ another titleblock. We don't use xrefs at all, so this is out of the question. I can't get a lisp to edit attributes, which is how I believe the information needs to be input into the titleblock.

    I am not set on using a block w/ attributes, but need something that will allow us to automate the process of putting in a titleblock and will also prompt users to fill in the titleblock after it is inserted. Attached is the lisp I was working on, so you can see how we scale and how I was TRYING to go about it.

    I'm open to any suggestions, but am not an advanced user by any means, so I would imagine I will have follow up questions.

    Thank you so much!
    Attached Files Attached Files

  2. #2
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Titleblock help

    If you set AttDia and AttReq to 1, you get the dialog interface for filling in the attributes of the titleblock. There is no need to use/force a command-line interface to get the information. Unless you want to refuse to place the titleblock until the information is completely provided.

    Why, oh why, isn't the titleblock being placed in a layout? You have AutoCAD 2009, which means that your firm has known about paperspace for, oh, a decade or more.
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  3. #3
    Member
    Join Date
    2008-05
    Posts
    25

    Default Re: Titleblock help

    Quote Originally Posted by RobertB View Post
    If you set AttDia and AttReq to 1, you get the dialog interface for filling in the attributes of the titleblock. There is no need to use/force a command-line interface to get the information. Unless you want to refuse to place the titleblock until the information is completely provided.

    Why, oh why, isn't the titleblock being placed in a layout? You have AutoCAD 2009, which means that your firm has known about paperspace for, oh, a decade or more.
    I'm perfectly fine w/ using the attributes interface, however when I tried to do as you mentioned (several weeks ago) it ends up not setting any of the other settings I need to set, or the option of rescaling the title block. Are you recommending that I rearrange the lisp so that the last thing I do is insert the border? That still won't give me the option of rescaling the titleblock.

    As for the layout vs. model space... "this is the way we've been doing it for 20 years." I've only been here 4, but there is no way I'll get the company to change their practice of having everything in model space. I completely agree w/ you that it should be done that way, but that isn't my decision to make.

  4. #4
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Hartford, Michigan
    Posts
    3,086

    Default Re: Titleblock help

    Quote Originally Posted by stevenw00 View Post
    I'm perfectly fine w/ using the attributes interface, however when I tried to do as you mentioned (several weeks ago) it ends up not setting any of the other settings I need to set, or the option of rescaling the title block. Are you recommending that I rearrange the lisp so that the last thing I do is insert the border? That still won't give me the option of rescaling the titleblock.

    As for the layout vs. model space... "this is the way we've been doing it for 20 years." I've only been here 4, but there is no way I'll get the company to change their practice of having everything in model space. I completely agree w/ you that it should be done that way, but that isn't my decision to make.
    well, sometimes the way things are done must be changed to be able to use customization. There are a few processes we have had to force our users to change in order to introduce new customization, plotting everything from paperspace was one of them.
    Christopher T. Cowgill, P.E.
    WIGHTMAN & ASSOCIATES, INC.
    ENGINEERING <> SURVEYING <> ARCHITECTURE
    AutoDesk Infrastructure Design Suite Premium 2013 x64
    Windows 7 Pro x64

  5. #5
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Titleblock help

    Quote Originally Posted by stevenw00 View Post
    I'm perfectly fine w/ using the attributes interface, however when I tried to do as you mentioned (several weeks ago) it ends up not setting any of the other settings I need to set, or the option of rescaling the title block. Are you recommending that I rearrange the lisp so that the last thing I do is insert the border? That still won't give me the option of rescaling the titleblock.
    Here is some sample code that shows you how to insert a block, using the normal attribute editor interface, and still allow for further modification such as scaling the block.

    Code:
    (defun C:Test  (/ lastObj)
     (setq lastObj (entlast))
     (setvar 'AttDia 1)
     (setvar 'AttReq 1)
     (command "._Insert" "Flag" "_s" 1.0 "_r" 0.0)
     (while (= (logand (getvar 'CmdActive) 1) 1) (command pause))
     (setq newObj (entlast))
     (cond ((/= lastObj newObj)
            (initget 0 "Yes No")
            (setq inp (getkword "\nRescale block? [Yes/No] <No>: "))
            (cond ((= inp "Yes")
                   (command "._Scale" "_si" newObj (cdr (assoc 10 (entget newObj))))
                   (while (= (logand (getvar 'CmdActive) 1) 1) (command pause))))))
     (princ))
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  6. #6
    Member
    Join Date
    2008-05
    Posts
    25

    Default Re: Titleblock help

    Thank you Robert! I will give that a shot and see if I can get it to work. I appreciate the help.

  7. #7
    Member
    Join Date
    2008-05
    Posts
    25

    Default Re: Titleblock help

    In the process to test out your lisp and modify it to work for me, I tried to set my titleblock back up w/ attributes and start testing it. For whatever reason, it is no longer prompting me to input the fields when I insert the block now. This is bad because I can't try your script, but this is good, because I should be able to use attedit to change the value of the attributes now.

    Problem: I can't get attedit to input the value. In my lisp I:
    Code:
     (Setq
          n6text (getstring T "\nEnter Description Line 1: ")
        )
    to set the variable
    Code:
        (princ "\nDescription 1 is ")
        (princ n6text)
    to show that it was set (will be removed once finished)
    Code:
    (Setq
            n0	(list 0.0 0.0)
            n6 (list 14.25267415 0.58959989)
    	A2 (* (- (Car n6) (Car n0)) dwgscl)
    	A3 (* (- (Cadr n6) (Cadr n0)) dwgscl)
    	n6 (list (+ (Car n0) A2) (+ (Cadr n0) A3))
    )
    to set the location
    and
    Code:
        (Command "attedit" "y" "" "" "" n6 "" "v" "r" n6text "" )
    to edit the attribute.
    The problem is that it doesn't assign anything to the value when I do that. Will it not read the variable for some reason? Any other ideas? Am I just an idiot?

  8. #8
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Titleblock help

    What flags did you set for the attribute definitions? It almost sounds like you've used the Constant flag, which is a bad idea.
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  9. #9
    Member
    Join Date
    2008-05
    Posts
    25

    Default Re: Titleblock help

    Quote Originally Posted by RobertB View Post
    What flags did you set for the attribute definitions? It almost sounds like you've used the Constant flag, which is a bad idea.
    I honestly don't know what you're referring to. I've never heard of a "flag".

  10. #10
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Titleblock help

    Select the attribute definition(s) and check their properties.
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

Page 1 of 2 12 LastLast

Similar Threads

  1. drawings on 30x42" titleblock: client now wants 11x17" titleblock
    By graphite in forum Revit Architecture - General
    Replies: 4
    Last Post: 2011-11-08, 05:05 PM
  2. titleblock....
    By ntnik in forum Revit Architecture - Families
    Replies: 1
    Last Post: 2011-04-11, 01:00 PM
  3. titleblock
    By bennetttwin in forum Revit Architecture - General
    Replies: 2
    Last Post: 2004-12-20, 04:46 PM
  4. NFC on Titleblock
    By GuyR in forum Revit - FAQ (Read only)
    Replies: 0
    Last Post: 2004-12-06, 10:47 PM
  5. Convert 2436 titleblock to 3042 titleblock?
    By Colquhoun in forum Revit Architecture - General
    Replies: 6
    Last Post: 2004-08-23, 04:45 PM

Posting Permissions

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