I have a situation where I have a AutoCAD table linked to a Excel table to retrieve lots of general information for a standard drawing. That works just fine. In additionally I can use the fields "formula" field name and select a cell in the AutoCAD table to pull the data from the cell to the field, and this works for table cells that are numeric, but some of the cells are text based, and for these situations AutoCAD simply gives me the #### result. Is there a way to use a field to display text data from a AutoCAD table Cell?
Someone posted this exact issue in the Civil3D forum, and no solution was found. By looking into this the only thing I could think of was to do another table and use the range option to bring in only the cell with the text I wanted.
Yea, i thought of that too, the propblem with that is i am wanting the information to be part of mtext, and the surrounding text is always of different length, so a inserted field would be required to keep the justification etc.. correct.
Thanks for the reply!!
If there is no solution, you can bet i am adding it to the Wish list!!
My first thoughts were to use a field referencing the relevant MText entity representing the cell value in the anonymous block associated with the Table.
e.g.:
(defun _TableCellMText ( table cellvalue ) ( (lambda ( table / mtext ) (while (and (not mtext) (setq table (entnext table))) (if (and (eq "MTEXT" (cdr (assoc 0 (entget table)))) (eq cellvalue (cdr (assoc 1 (entget table)))) ) (setq mtext table) ) ) mtext ) ( (lambda ( table ) (tblobjname "BLOCK" (cdr (assoc 2 (entget table)))) ) (if (eq 'VLA-OBJECT (type table)) (vlax-vla-object->ename table) table ) ) ) )
(_TableCellMText <Table Entity> "Cell Value")
But creation of a field expression referencing the ObjectID of this entity throws an exception, so now I'm out of ideas, save using a reactor.