Fields Updating Incorrectly

Fields Updating Incorrectly

Anonymous
Not applicable
3,573 Views
33 Replies
Message 1 of 34

Fields Updating Incorrectly

Anonymous
Not applicable

Civil 3D 2018, Win 7

 

I have a piece of MTEXT that takes the name of the PS tab (field: system variable, ctab) and uses it for a sheet number in the PS border. I have more than one PS tab. The problem is that when fields update (FIELDEVAL=2, update on save) they *ALL* update with whatever PS tab I'm in, or with the value MODEL if I am in MS. The diesel expression $(getvar, "CTAB") behaves exactly the same - it returns only the name of whatever space I am in at the moment when fields are updated.

 

What can I do to get the fields to update with the name of the PS tab they are in only?

 

thanks

0 Likes
Accepted solutions (1)
3,574 Views
33 Replies
Replies (33)
Message 2 of 34

rkmcswain
Mentor
Mentor
I believe it is behaving as designed. You can only have one active layout and it's reporting that. The correct value is reported when you publish the layouts.
R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 3 of 34

Anonymous
Not applicable

Unfortunately, the fields don't update correctly, for me, when I publish. I sent plans out with three sheets from one dwg named "MODEL"   😕

 

I played with the FIELDVAL variable, though. If I set it to 31and it works properly on a SAVE. I have no idea why this should be differently than FIELDVAL=2, but it is.

0 Likes
Message 4 of 34

dmfrazier
Advisor
Advisor

"...takes the name of the PS tab (field: system variable, ctab) and uses it for a sheet number in the PS border."

 

As @rkmcswain indicated, your field is working correctly.  The problem is that the CTAB variable contains a value that reflects the "current tab".  For any one DWG file, there can be only one "current tab". Those sheets which plotted with the value "Model" in that field are telling you that the "current tab" at the time of the plot was the Model tab.

 

If you want the field to show the name of the layout, you have to modify your field to get that value.

0 Likes
Message 5 of 34

Anonymous
Not applicable

"If you want the field to show the name of the layout, you have to modify your field to get that value."

 

I looked but did not see another field for the layout tab name. This is what I need, I think.

 

How do others get a title block to populate with the name of the layout tab, assuming that you name the tab the same as the sheet will be named in the paper plan set?

0 Likes
Message 6 of 34

dmfrazier
Advisor
Advisor

Look in the "SheetSet" category.

I can't give you more specific direction on this topic, but I'm sure you can find more info by searching the forums, waiting for others to chime in, or looking in Help.

Message 7 of 34

Dathan.neal
Enthusiast
Enthusiast

Yes, we use sheetset values for this. 

0 Likes
Message 8 of 34

MMcCall402
Mentor
Mentor
Accepted solution

Sheet Set Manager.

 

All of out drawing templates have a title block already inserted in paper space tab(s). (its a re-sizable dynamic block) This title block is loaded with attributes to fill in the required information. The default values of those attributes are fields set to information supplied by the sheet set manager.  The tabs in the templates a named with the anticipated title for that tab/sheet.  (example: Cover Sheet)  When a tab is added to the sheet set manager the the tab name is set as the default title for that sheet. There is an attribute field that looks for the sheet title from the sheet set manager.  The title can be edited later from the sheet set manager as needed.

 

Sheet numbers come via the sheet set manager.

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

Message 9 of 34

jeff_rivers
Advisor
Advisor

As others have already said, Sheet Set Manager is the tool to use to automate this and other components of your titleblock.

 

Heidi Hewett wrote an excellent tutorial, available here:  

 

http://heidihewett.blogs.com/my_weblog/files/Sheets_Happen.pdf


Jeffrey Rivers
Win 10 Pro 64-bit, Intel i9 3.7GHz, 64 GB
NVIDIA RTX A4000
C3D 2020 V13.2.89.0
Message 10 of 34

ACADuser
Collaborator
Collaborator

drenaud,

 

Set FIELDEVAL=31.  This will force fields to update during all available operations (open, save, plot...).

ACADuser
Civil 3D 2018, Raster Design 2018
Windows 7 Enterprise
Dell Precision 5810 Workstation
Intel Xeon E5-1630 v3 @ 3.70GHz
32GB RAM, NVIDIA Quadro K2200 4 GB GDDR5
DUAL 27" Dell UltraSharp U2713HM
Message 11 of 34

jeff_rivers
Advisor
Advisor

Yes, but as pointed out above, the field will only update to contain the value of the currently active sheet.  I.e. it will overwrite the correct value with an incorrect value.  What's needed is the value for each individual sheet.  


Jeffrey Rivers
Win 10 Pro 64-bit, Intel i9 3.7GHz, 64 GB
NVIDIA RTX A4000
C3D 2020 V13.2.89.0
0 Likes
Message 12 of 34

MMcCall402
Mentor
Mentor

Each tab would need to be active at the instant the tab/sheet is plotted.  It would probably work for the drawing with one tab but not for a drawing with multiple tabs as I don't think a tab is made active when it gets plotted/published.  Its kind of a timing thing.

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

0 Likes
Message 13 of 34

dmfrazier
Advisor
Advisor

"...I don't think a tab is made active when it gets plotted/published."

 

This is correct.  CTAB is stored in the drawing at the time it is saved, and that's what it will be when the drawing is Published. In fact the OP's chosen method of attempting to use the CTAB drawing variable and getting the same value on each plotted "sheet" (layout tab) is evidence of that.

 

Unfortunately, AutoCAD does not give us access to the tab names thru Fields (aside from the current tab). Not sure why...

0 Likes
Message 14 of 34

Anonymous
Not applicable

as mentioned in above post using ctab inexplicably works with all unique tabs when FIELDVAR set to 31. But I can't trust it so am going to look at sheet set variables. hopefully this will work with C3D plan production and my template sheet drawing.

 

thanks for the input everyone.

0 Likes
Message 15 of 34

dmfrazier
Advisor
Advisor

Perhaps it's not so inexplicable!

Perhaps it is easily explicated by me being wrong!

Perhaps Publish actually does switch from tab to tab as it works, changing CTAB as it goes!

Perhaps we can learn something new every day!

 

I apologize for giving you misleading information. (As one of my friends would often say to me: You screwed up! You trusted yourself!)

 

The only reason not to trust it (and this is probably valid) is that you can't always be sure that FieldEval will be set to 31. The setting is stored in the registry, so it is tied to your current AutoCAD profile (not saved in the drawing file). I suppose as long as you trust that your profile is stable, then you should be able to trust CTAB.

 

(I'm pretty sure that last bit of information is correct...)

 

 

0 Likes
Message 16 of 34

ACADuser
Collaborator
Collaborator

jeff_rivers wrote:

Yes, but as pointed out above, the field will only update to contain the value of the currently active sheet.  I.e. it will overwrite the correct value with an incorrect value.  What's needed is the value for each individual sheet.  


 


MMcCall402 wrote:

Each tab would need to be active at the instant the tab/sheet is plotted.  It would probably work for the drawing with one tab but not for a drawing with multiple tabs as I don't think a tab is made active when it gets plotted/published.  Its kind of a timing thing.


 


dmfrazier wrote:

"...I don't think a tab is made active when it gets plotted/published."

 

This is correct.  CTAB is stored in the drawing at the time it is saved, and that's what it will be when the drawing is Published. In fact the OP's chosen method of attempting to use the CTAB drawing variable and getting the same value on each plotted "sheet" (layout tab) is evidence of that.

 

Unfortunately, AutoCAD does not give us access to the tab names thru Fields (aside from the current tab). Not sure why...


 

Using a field and referencing the ctab varialble has worked flawlessly to date (currently using C3D 2015). I must be doing something wrong...

 


drenaud wrote:

as mentioned in above post using ctab inexplicably works with all unique tabs when FIELDVAR set to 31. But I can't trust it so am going to look at sheet set variables. hopefully this will work with C3D plan production and my template sheet drawing.

 

thanks for the input everyone.


Sorry, I was reading too fast and missed where you mentioned setting FIELDVAR to 31.  You mentioned using a diesel expression.  Opening my template I see that a different method is being used. Under "Field names" the ctab variable is called using "SystemVariable" vs "DieselExpression"

ACADuser
Civil 3D 2018, Raster Design 2018
Windows 7 Enterprise
Dell Precision 5810 Workstation
Intel Xeon E5-1630 v3 @ 3.70GHz
32GB RAM, NVIDIA Quadro K2200 4 GB GDDR5
DUAL 27" Dell UltraSharp U2713HM
0 Likes
Message 17 of 34

Anonymous
Not applicable

yep to all of it. I'm still going to look for sheet manager variable, because other users may go change FIELDVAR on me then we will look like idiots if badly numbered plan sheets go out.

 

But! set at 31 it works on _QSAVE, not just publish. I get how ctab uses whatever tab is current, that's why I said it's inexplicable.

 

this has been educational for me, thank you all. my goal is to make things as foolproof as possible for my users. we are switching over from Microstation and that is stressful enough for them.

0 Likes
Message 18 of 34

dmfrazier
Advisor
Advisor

"...my goal is to make things as foolproof as possible for my users."

 

Two more cents:

1. There is no such thing as "foolproof", but there is "fool-tolerant".

2. None of your users are fools.

Message 19 of 34

Anonymous
Not applicable

OK, I can't find the correct sheet set variable to use. I see sheetnumber, but where does this data come from? Using Plan Production I can easily name the ps tabs the same as the sheet number. we are the water utility, so our sheets are "W-<no>". other city agencies may be something else.

 

 

0 Likes
Message 20 of 34

Anonymous
Not applicable

from above, I found it ... "The tabs in the templates a named with the anticipated title for that tab/sheet." CurrentSheetTitle for the win.

0 Likes