How to make an automatically inserted table bigger than 3x3?

Answered by: John Dreystadt (PTC) Last Updated: 2006-09-20

=Question by N.N.=

We have an element that contains a required graphic child and a required table child. When we insert that element, the auto-inserted table is inserted as a 1x1 table without borders. I have two questions...


 * 1) Is there a way to force Epic to insert more columns and rows for this auto-inserted table? For example, by default, Epic auto-inserts a 3x3 table.
 * 2) Although the table is inserted into Epic without borders, the Table Properties shows the border as 1px. However, the XML claims 0px. Is there a way to force Epic to apply a 1px border to the auto-inserted table?

=John Dreystadt answers=

Take a look at the "insert_tag_auto" callback. This callback is called after the auto-inserted tags are in place and gives the oids of the different tags that were inserted including the table.

You could write some code that walked the array of inserted OIDs and looked for a table. If it found a table, it would then check to see if the parent was the element where you wanted the specific table. If it found the right parent, it could then operate on the table adding row, columns, and setting table properties as appropriate.

Pay close attention to the "op" parameter in this callback. You probably only want to do this work on op=2.