Jump to content

Title Block


desiree

Recommended Posts

Hey all...

I was wondering if anyone had a lisp or batch routine that would assist me. In the title block of our drawings there is a section for checkers initials and date. We have about 600 drawings that need to have this filled in and we do not want to have to go through all the drawings one by one.

 

I know that batch commands would handle a fair bit of drawings but don't know if that can be made to change the bits we need.

 

Thanks for any help.

Des

Link to comment
Share on other sites

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • fixo

    10

  • autouser

    7

  • Freerefill

    3

  • desiree

    2

If you can write it, I can batch it.

 

Writing a LISP to fill in data in a block with attributes is easy, one would just need to know the name of the attribute and the data to fill in (as well as how the user would input that data, would it be dynamic or part of the LISP?), the name of the block, stuff like that.

 

For batch purposes, I have a batch engine in my signature that you can check out. I admit it's not quite user-friendly, but it has served me very well, and I don't doubt I could apply a block-attribute-editing LISP to it in minutes.

Link to comment
Share on other sites

I would need assistance with the Lisp routine as well. I have not mastered them and in honesty haven't written one that works yet.

 

If anyone is able to write one let me knwo the information needed and I will provide it.

 

It would be a great help

Link to comment
Share on other sites

Try this. It prompts you to select the block you want, but we can work on that. I just want to see if this is doing what you'd like it to do.

 

Note that it will ask you for the attribute tag, so you should know what it is before you run the LISP.

 

If it works, then we can tweak it so that it automatically selects the block you want to edit.

 

(defun c:blkEdit( / ent attTag attVal)
 (setq ent (car (entsel "\nSelect block: "))
   attTag (getstring "\nEnter attribute tag: ")
   attVal (getstring "\nEnter desired value for attribute: "))
 (blkTagEdit ent attTag attVal)
 )

(defun blkTagEdit(blkEnt attTag attVal / attEnt attLst)
 (if (= (cdr (assoc 66 (entget blkEnt))) 1)
   (progn
     (setq attEnt (entnext blkEnt))
     (while (/= (cdr (assoc 0 (entget attEnt))) "SEQEND")
   (if attEnt (setq attLst (cons (cons (cdr (assoc 2 (entget attEnt))) attEnt) attLst)))
   (setq attEnt (entnext attEnt)))
     (if attLst (mapcar '(lambda (x) (vla-put-textString (vlax-ename->vla-object (cdr x)) attVal))
            (vl-remove-if-not '(lambda (x) (= (car x) attTag)) attLst)))
     )
   )
 (princ)
 )

Link to comment
Share on other sites

Hi freerefill,

 

I am also looking for ways to input back into block as attribute. I have excel file created from _eattext. Is there any way to import that excel file to block attributes drawings back after modified? Thanks

Link to comment
Share on other sites

I haven't used eattext much, but I believe you should be able to import whatever you need. You'll just need to know how to link everything together, that is to say, what piece of information goes where.

Link to comment
Share on other sites

Hey all...

I was wondering if anyone had a lisp or batch routine that would assist me. In the title block of our drawings there is a section for checkers initials and date. We have about 600 drawings that need to have this filled in and we do not want to have to go through all the drawings one by one.

 

I know that batch commands would handle a fair bit of drawings but don't know if that can be made to change the bits we need.

 

Thanks for any help.

Des

 

I have similar one on what you need

Unfortunatelly I'm not an owner of source code

- I gave it to my mate, by this reason I can't edit it too :)

See how it will be work for you - try first on your backup folder!

 

~'J'~

coffee.zip

Link to comment
Share on other sites

Hi Freerefill, thanks .... but how do i actually do that as I am not very familiar with coding in autocad. I just want to export some attributes in title block modify them and import them back to the exact same place. thanks

Link to comment
Share on other sites

Hi Freerefill, thanks .... but how do i actually do that as I am not very familiar with coding in autocad. I just want to export some attributes in title block modify them and import them back to the exact same place. thanks

 

You can try this routine to export title block

 

~'J'~

tex.LSP

Link to comment
Share on other sites

...modify them and import them back to the exact same place. thanks

 

The following one will be allow you to import

attributes back from file that would be created

with help of my prior routine tex.lsp

 

Keep in mind you need to select block that

has been exported into the Excel before otherwise

you will be get an error message

(say you clicked title block from layot2 but

in fact you exported it from layout1)

 

~'J'~

tim.LSP

Link to comment
Share on other sites

Hi fixo, it works ..... just wondering how do i do that to apply to same title blocks in different sheets and different drawings simultanuously? Thanks again.

Link to comment
Share on other sites

fixo ...... i am thinking is it possible to "search" for the title blocks in all sheets and all drawings in the folder or sheet set and export the attributes to the one excel file with different rows. Without user input. And import all of them back to drawings without user input as well (maybe via sheet set or something). thanks dude you are the man......

Link to comment
Share on other sites

fixo ...... i am thinking is it possible to "search" for the title blocks in all sheets and all drawings in the folder or sheet set and export the attributes to the one excel file with different rows. Without user input. And import all of them back to drawings without user input as well (maybe via sheet set or something). thanks dude you are the man......

 

Sorry, I have a serious disease now

Perhaps I'll out of my work 2-3 days or so

Later I'll try to rewrite it to your suit

Stay watching this thread :)

 

~'J'~

Link to comment
Share on other sites

cheers mate .... i thought you are already running away from this thread. hmmm.... i really need to learn to program in autocad. take care.

 

Thanks,

Here is the first one from two routines

This will allow you import all title blocks

on all layouts entire the selected folder

You can change Excel file name inside the code

as you need it

 

~'J'~

btex.lsp

Link to comment
Share on other sites

Hi fixo ..... glad you are back .... when i run the program .... it asks me to type in the block name and then ask me to select the folder. After that message come up and say be patient and please wait with ok button. And when i click ok it open the file in new window save the excel file. But when i open the file there is nothing there. Am i missing something? thanks

Link to comment
Share on other sites

Hi fixo ..... glad you are back .... when i run the program .... it asks me to type in the block name and then ask me to select the folder. After that message come up and say be patient and please wait with ok button. And when i click ok it open the file in new window save the excel file. But when i open the file there is nothing there. Am i missing something? thanks

 

Perhaps, problem is on that this block

does not exist

I ended up the second part to batch

changing title blocks entire the folder -

working good too on my end

I will be varnish it a bit then I'll send

here

 

~'J'~

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...