Results 1 to 8 of 8

Thread: Titleblock Lsp

  1. #1
    Member
    Join Date
    2008-05
    Posts
    25
    Login to Give a bone
    0

    Default Titleblock Lsp

    Our company has a title block that is inserted, scaled, and modified by a lsp routine. I did not create this, and am VERY new to lisp. I have modified it to work w/ our new title block, however part way through filling out the text fields it stops and gives me a "bad argument type: lentityp nil" error. I believe this is because it can't find the next piece of text that it is supposed to edit, but I can't figure out why it can't find it.

    If I give someone the title block and lsp file, can someone PLEASE trouble shoot this for me, or point me in the correct direction? I can provide any addition information or files that are necessary. I've been working on this for days and just can not figure out why it can not find this other piece of text.
    If you can help, please let me know where I can send the files, or what I need to do w/ them. I currently don't have any place online where I can store them, but if I can post them here or email them that would be great.

    Thank you!
    Steven

  2. #2
    Member
    Join Date
    2008-05
    Posts
    25
    Login to Give a bone
    0

    Default Re: Titleblock Lsp

    I really think this will be a simple one for you guys... I'm just somewhat clueless.

    Here is the LISP in question. I can get you the title block when needed.
    Attached Files Attached Files

  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: Titleblock Lsp

    Hi and welcome on board
    Upload your title block, perhaps I can help
    I use A2008 (eng)

    ~'J'~

  4. #4
    Member
    Join Date
    2008-05
    Posts
    25
    Login to Give a bone
    0

    Default Re: Titleblock Lsp

    Here is our title block. You can probably tell, but what it does is... you draw whatever you are going to draw, and then run the lisp. It puts the title block around what you had in your drawing, resizes it, and moves everything back to 0,0. Then it asks for info to be filled in. When I run it currently it will fill in the first four fields (city/state, line 1, line 2, and line 3.) I think I may have a few things set up to where it prints the coordinates it uses as well (in the command manager... I did that so I could see where it was going.) After line 3 is filled out, it crashes though. I think it is not able to find my next point (material.)

    Let me know what you can find. Thank you again!
    Attached Files Attached Files

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

    Question Re: Titleblock Lsp

    I can work with it just tomorrow morning
    See you

    ~'J'~

  6. #6
    Member
    Join Date
    2008-05
    Posts
    25
    Login to Give a bone
    0

    Default Re: Titleblock Lsp

    Sounds great. I'm able to work my way through it, so as long as it doesn't need completely re-written I'm capable of making changes to it, if you can point me in the right direction. Whatever you can provide tomorrow will be great.

  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: Titleblock Lsp

    Sorry I can't give you the complete solution
    Any of points in your lisp have a wrong position
    What I recommend to doing:
    to the first open your title block drawing and
    run the following routine:

    Code:
    (defun C:NT (/)
    ;;local defun
    (defun normalize-text (ss / )
    ;;local defun  
      (defun dxf (key lst)
        (cdr (assoc key lst))
        )
      
      (while
    	(setq en (ssname ss 0))
    	(setq elist (entget en))
    
    	    (if (eq "." (dxf 1 elist))
    	        (progn
    		(setq elist (entmod (subst (cons 1 "I") (assoc 1 elist) elist)))
    	        (entupd en)
    	        (command "justifytext" en "" "MC")))
        (ssdel en ss)
        )
    )
      ;;main part
      (command "_zoom" "_E")
      (if (setq ss (ssget "_X" (list (cons 0 "TEXT")(cons 67 0))))
          (normalize-text ss)
        )
      (command "_zoom" "_P")
      (princ)
      )
    This will replace all default text from "." (dot) to "I"
    and set justify for them to middle center

    Then you need insert manually this block in other
    drawing with drawing scale 1:1
    Then type in command line ID and use snap to insert
    (or set OSMODE to 64)
    Loop through all of texts you need and replace correct
    point values in your lisp file

    Secondly, better yet always to insert title block with scale 1.0
    and just after you will change all what you need to scale it
    to desired value
    All as I said is just my opinion, maybe I'm wrong

    To the third, you can run attached lisp (this is framwework only,
    I removed from there any things to the quick test)

    Sorry for my poor english, hope this will helps

    ~'J'~
    Attached Files Attached Files

  8. #8
    Member
    Join Date
    2008-05
    Posts
    25
    Login to Give a bone
    0

    Default Re: Titleblock Lsp

    I think I understand what you're saying, and I'll give it a try. Something in the scaling is what was making the text locations wrong, but I can't figure out what. It is almost like it is scaling it in the X and Y direction, instead of using a single scale factor.
    I'll use your lisp and go from there.

    Thanks again.

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, 06:05 PM
  2. Titleblock Changes
    By rjcrowther in forum Revit - In Practice
    Replies: 3
    Last Post: 2007-05-03, 06:13 PM
  3. titleblock
    By bennetttwin in forum Revit Architecture - General
    Replies: 2
    Last Post: 2004-12-20, 05:46 PM
  4. NFC on Titleblock
    By GuyR in forum Revit - FAQ (Read only)
    Replies: 0
    Last Post: 2004-12-06, 11:47 PM
  5. Convert 2436 titleblock to 3042 titleblock?
    By m_cahoon14336 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
  •