Author Topic: Field in Title Block with some math?  (Read 1690 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Field in Title Block with some math?
« on: February 09, 2014, 04:12:10 PM »
I want a Field in the Title Block (Mtext) to get the Tab name which is 1 through 12 and add to it a Custom Property "TB-StartPage" which is "11"
Result will be 12 13 14 .... in each title block.
Can the be done?

I haven't used Fields much & still in ACAD 2006.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

kruuger

  • Swamp Rat
  • Posts: 637
Re: Field in Title Block with some math?
« Reply #1 on: February 09, 2014, 05:00:56 PM »
I want a Field in the Title Block (Mtext) to get the Tab name which is 1 through 12 and add to it a Custom Property "TB-StartPage" which is "11"
Result will be 12 13 14 .... in each title block.
Can the be done?

I haven't used Fields much & still in ACAD 2006.
hi cab
i'm not sure if understand correctly but you need apply this string to mtext:
Code: [Select]
"%<\AcVar ctab>% & %<\AcVar CustomDP.TB-StartPage>%"k.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Field in Title Block with some math?
« Reply #2 on: February 09, 2014, 05:32:17 PM »
Thanks
Not quite there.
Ctab = 1
TB-Startpage = 11
Text should read 12

"%<\AcVar ctab>% + %<\AcVar CustomDP.TB-StartPage>%"
If I could do it in LISP
"(itoa(+ (atoi %<\AcVar ctab>%) (atoi %<\AcVar CustomDP.TB-StartPage>%) )"
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Field in Title Block with some math?
« Reply #3 on: February 09, 2014, 06:14:12 PM »
Untested, but try:

Code: [Select]
%<\AcExpr %<\AcVar ctab>% + %<\AcVar CustomDP.TB-StartPage>% >%

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Field in Title Block with some math?
« Reply #4 on: February 09, 2014, 06:37:11 PM »
WOW  it was under my nose all the time.  :oops:

Thanks Lee.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Field in Title Block with some math?
« Reply #5 on: February 09, 2014, 06:52:19 PM »
No worries!  :-)