autocad 2006 fields
autocad 2006 fields
(OP)
Anybody played around with fields yet?
I am trying to get a total number of tabs. I can use ctab to harvest the name of tab, but I really need the qty of tabs or the variable (if any) to read the last tab.
Also, looking to remove the ".dwg" from the dwgname variable.
I am currently using strings but cannot figure out how to get strings to do this.
tzinger
I am trying to get a total number of tabs. I can use ctab to harvest the name of tab, but I really need the qty of tabs or the variable (if any) to read the last tab.
Also, looking to remove the ".dwg" from the dwgname variable.
I am currently using strings but cannot figure out how to get strings to do this.
tzinger





RE: autocad 2006 fields
Have been searching high and low for that ability also.
Lisp function (Length(Layoutlist)) does return the number of layout tabs (minus the model tab), so you do end up with the total number of tabs. That being said, my ability to write lisp from scratch is non-existant, or even how to get end result into a field at this time.
Anybody else, Is it possible to get this into a DIESEL format (available under fields pull downs).
I apologize if this gets you nowhere faster.
Jimbo
RE: autocad 2006 fields
Then you can use both:
(length(layoutlist))
and
(substr(getvar"DWGNAME") 1 (-(strlen(getvar"DWGNAME")) 4))
to solve your problems
Some formatting codes for fields can be found on:
ht
Vladimir Michl, www.xanadu.cz
RE: autocad 2006 fields
(Defun C:UPDATE ()
(setq qty(length(layoutlist)))
(setvar"INTERSECTIONCOLOR" QTY)
(command "REGEN"))
This rountine highjacks the sysvar intersectioncolor....its not a very important variable and rarely used, I suppose you could get its value then reset it when finished but let proceed....by high jacking the variable and seting it to the number of layout tabs***(setq qty(length(layoutlist)))***you can then call it using fields in your title block.....
works great!!!!!!!
RE: autocad 2006 fields
(setq QTY (vla-get-count (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object)))))
"Everybody is ignorant, only on different subjects." — Will Rogers