Update Field Lisp

Update Field Lisp

Anonymous
Not applicable
2,242 Views
2 Replies
Message 1 of 3

Update Field Lisp

Anonymous
Not applicable

I posted in another forum my issue and you can read it to help understand my issue.

 

http://forums.autodesk.com/t5/autocad-2010-2011-2012/field-updating-issues/m-p/5546713/highlight/fal...

 

But in a nut shell I am trying to have a field in an xref'd border that reads the layout tab. So this works for the most part. I am wanting the field to update every time I change layout tabs, considering I have multiple layout tabs in a drawing file but this does not happen automatically. I have to manually type "updatefield" and "regenall" and then it will change to the proper text.

 

0 Likes
2,243 Views
2 Replies
Replies (2)
Message 2 of 3

gccdaemon
Collaborator
Collaborator

Under options -> System tab, on the bottom left there should be a raido button to "Regen when switching layouts". As long as that is selected and your FIELDEVAL system variable is set to 32, you shouldn't have any problems.

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
0 Likes
Message 3 of 3

Trev_Smith
Contributor
Contributor
One simply way is to use the following >

;create a selection set of items eg: all items on your prefered layer
(setq #temp (ssget "X" (list (cons 8 "Your_Layer_Name"))))

;then update all items on the layer in selectionset
(command ".updatefield" #temp "")

maybe not the best as you are selecting across the whole drawing but at least you can filter it down to layer, block, mtext etc.
But pretty simple at least.
0 Likes