function to extract 2 attribute values from a specific block in the drawings of a specified folder
by Jeff Mishler Feb. 9, 2006
And kindly edited by Tim Willey to extract any number of attributes
Modified by Lee Mac to process open drawings
Modified by CAB forced Tags to match to Tags strings in all upper case
Rewritten by Lee Mac 14.11.2011 to process a directory supplied as an argument.
Thankyou verymuch Lee
It works wonder, But i stumble across one minor issue that i would like to overcome.
which is the
coversheet which have different block name to the normal border sheet title but still have attributes info.
(defun c:test (/ title ss)
(setq Title "*[AB][01234]*")
(if (setq ss (ssget "_X" (list (cons 0 "insert") (cons 2 Title) (cons 66 1))))
(progn
(setq titlename (cdr (assoc 2 (entget (ssname ss 0)))))
(getindex (getvar "dwgprefix") titlename)
(write2csv)
)
)
My question is, instead of providing blockname as an argument to GetIndex function.
Is it possible for ODBX to determine the block name based on a existing "TAGname"
say if a unigue tag name is found ie. attr tag is "DRAWING_NUMBER", then get the the block name if it contain this tag?Because the block name is a big variable, name varies from project to project and based on sheet size.
I throught it would more user friendly if the program could self determine the block name if a particular attribute tag name is found.. This also allow to produce the sheet index if a project contain multiple sheet names but with similar attribute definitions.
This link
http://www.theswamp.org/index.php?topic=32633.msg381796#msg381796is also from yourself Lee is the closest to what i think might be able to assist to providing blockname.
Thankyou