Titleblock That Updates in Layout Tab

Titleblock That Updates in Layout Tab

gottfriedjoseph01
Contributor Contributor
368 Views
9 Replies
Message 1 of 10

Titleblock That Updates in Layout Tab

gottfriedjoseph01
Contributor
Contributor

This question may be worded poorly, my apologizes in advance. I've come across a drawing that allows the user to update the tabs in the layout ribbon by updating the block. For example I would change the sheet number on the title block and the layout would update automatically. I've been trying to reverse engineer this but all of the info on how to do this is confusing. Can anyone help please? Below is the title block that I use. Thank you in advance.

0 Likes
369 Views
9 Replies
Replies (9)
Message 2 of 10

imadHabash
Mentor
Mentor

Hi,

I think that you're talking about FIELD command that you can use it for your need as you described. To make layout tab fields in AutoCAD, you can utilize the "Insert Field" command and the "C TAB" system variable to display the layout name within text or other fields. This allows you to dynamically update information on your sheets based on the layout name.

I suggest to follow this simple VIDEO that will help.

Imad Habash

EESignature

0 Likes
Message 3 of 10

gottfriedjoseph01
Contributor
Contributor

I''ve tried following the video but I don't know what change I need to make to my block to make it work.

0 Likes
Message 4 of 10

imadHabash
Mentor
Mentor

Would you attache here your CAD dwg file that you work on?

 

Imad Habash

EESignature

0 Likes
Message 5 of 10

dmfrazier
Advisor
Advisor

"I've come across a drawing that allows the user to update the tabs in the layout ribbon by updating the block. For example I would change the sheet number on the title block and the layout would update automatically."

 

Note that the solution offered by @imadHabash does the opposite of what you have asked for: it updates the block based on the layout tab name.

0 Likes
Message 6 of 10

gottfriedjoseph01
Contributor
Contributor

It's in my original post.

0 Likes
Message 7 of 10

imadHabash
Mentor
Mentor

If you want the layout tab name to change automatically when you edit the title block attribute, you’ll need a LISP routine or script to sync the block attribute with the layout name.

Imad Habash

EESignature

0 Likes
Message 8 of 10

Sea-Haven
Mentor
Mentor

Changing the layout name to match the title block "Project location" can be done via lisp. Ok now the problem you need to BEDIT the title block and change each tagname to an individual name not all as "X" which exists now. You should always have individual tag names even X1, X2 etc is better.

 

In saying that this will up date the layout name. Just be in the correct layout and change the attribute value then run the lisp.

 

; version 1
(defun c:layname ( / ent txt)
  (setq ent (nentsel "\nSelect the attribute for the layout name "))
  (setq txt (cdr (assoc 1 (entget (car ent)))))
  (command "layout" "Rename" (getvar 'ctab) txt)
  (princ)
)

 

; version 2
(defun c:layname2 ( / ent txt entg)
  (setq txt (getstring "\nType the new value for the attribute "))
  (setq ent (car (nentsel "\nSelect the attribute ")))
  (setq entg (entget ent))
  (entmod (subst (cons 1 txt) (assoc 1 entg) entg))
  (command "layout" "Rename" (getvar 'ctab) txt)
  (princ)
)
(c:layname2)
0 Likes
Message 9 of 10

O-Sarracino
Observer
Observer

In the titleblock insert an insert field (CTRL+F or right click add insert field) and select Others diesel expression and type this 

 

$(substr,$(getvar,"ctab"),1 )

This will read the layout tab name and add it to your text

0 Likes
Message 10 of 10

Sea-Haven
Mentor
Mentor

You don't need Diesel Ctab is available as a field. Field, System variable, Ctab.

%<\AcVar CTAB>%

 

Just copy above to your attribute.