Jump to content

Fields called from TAB Names


Recommended Posts

Posted

Trying to make a field that auto-updates to whatever the TAB NAME it's on. (confusing wording? sorry!)

 

example:

 

A paperspace tab name of "ABC" (those little folder tabs you name your paperspace layouts on....)

I want to make a text-field that updates to the name of the tab it's on. (text field is on tab ABC)

 

then the second tab you make named DEF would have the text-fields auto-update to say "DEF"...

 

This will eliminate me having to manually enter page numbers on the border layout, etc.

 

THANKS IN ADVANCE CT !!! :)

Posted
Trying to make a field that auto-updates to whatever the TAB NAME it's on. (confusing wording? sorry!)

 

example:

 

A paperspace tab name of "ABC" (those little folder tabs you name your paperspace layouts on....)

I want to make a text-field that updates to the name of the tab it's on. (text field is on tab ABC)

 

then the second tab you make named DEF would have the text-fields auto-update to say "DEF"...

 

This will eliminate me having to manually enter page numbers on the border layout, etc.

 

THANKS IN ADVANCE CT !!! :)

 

Field, System Variable, CTAB

Posted

thanks.

 

in addition to this thread for ref. if people search the same thing i found this.....

 

 

 

 

If you want to copy a text or block into multiple layouts in your drawing, you may want to use an automatic text which will display the name of the respective layout (paperspace). You can use the Field functionality for this - just insert a field and use the "Other" category, and the "System variable" CTAB value. Or just copy the following line (field code) as a DText:

%%

The same text will then read e.g. "Layout1" in the first (default named) layout, "Layout2" in the second, etc. This applies both for modelspace and paperspace text entities.

  • 15 years later...
Posted

The problem is that CTAB is always set to current tab value, which is no pronblem when cycling the different layouts and plotting them. The problem is when using external software where all layouts will display the CTAB name. For a drawing saved in TILEMODE 1:

 

Drawing                  Tab           Attribute value

Drawing1.dwg       Model       Model

Drawing1.dwg       Layout1    Model

Drawing1.dwg       Layout2    Model

 

This is what you want to see:

 

Drawing                  Tab           Attribute value

Drawing1.dwg       Model       Model

Drawing1.dwg       Layout1    Layout1

Drawing1.dwg       Layout2    Layout2

 

Posted
20 hours ago, Jesper Hedlund said:

The problem is that CTAB is always set to current tab value, which is no pronblem when cycling the different layouts and plotting them. The problem is when using external software where all layouts will display the CTAB name. For a drawing saved in TILEMODE 1:

 

Drawing                  Tab           Attribute value

Drawing1.dwg       Model       Model

Drawing1.dwg       Layout1    Model

Drawing1.dwg       Layout2    Model

 

This is what you want to see:

 

Drawing                  Tab           Attribute value

Drawing1.dwg       Model       Model

Drawing1.dwg       Layout1    Layout1

Drawing1.dwg       Layout2    Layout2

 

What external software are you using?

 

You will most likely need a custom solution.

Posted

You can generate the expression yourself; you can probably do this yourself with lisp.

This is just a sample of generating the expression, but I can imagine it would be possible to set the field across all layouts. Caveat, it’s not automatic  like CTAB

 

db = Db.curDb()
id = db.currentLayoutId()
expr = '%<\\AcObjProp Object(%<\\_ObjId {}>%).Name \\f "%tc1">%'.format(id.asOldId())
print(expr)

 

%<\AcObjProp Object(%<\_ObjId 2842273914048>%).Name \f "%tc1">%

 

Posted

There is a field property Ctab, in my Bricscad V25 it is not supported, but it is in Acad. There is also pretty sure total 

 

We just did a simple lisp that walked through all layouts and updated title block attributes like "Page No" of "howmanysheets" updated the actual layout name we used like "DXX", handy when re-ordered layouts. pretty sure there is  a total number of layouts field formula will have to find again.

Posted (edited)
8 minutes ago, BIGAL said:

There is a field property Ctab, in my Bricscad V25 it is not supported, but it is in Acad. There is also pretty sure total 

 

We just did a simple lisp that walked through all layouts and updated title block attributes like "Page No" of "howmanysheets" updated the actual layout name we used like "DXX", handy when re-ordered layouts. pretty sure there is  a total number of layouts field formula will have to find again.

 

sure it is, try       $(getvar,"ctab")   full field is %<\AcDiesel $(getvar,"ctab")>%

Edited by Danielm103

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...