As far as I know, you can't drive the table pattern dimensions directly.
But if you define multiple tables in your table pattern, you can create a relation to choose which table is to be used.
Create a table pattern with two tables (called "FOUR" and "SIX").
Rename the table pattern as "TABLE_PATTERN".
You can choose which table is to be used with these relations:
IF YES PATTERN_TABLE:FID_TABLE_PATTERN = "FOUR" ELSE PATTERN_TABLE:FID_TABLE_PATTERN = "SIX" ENDIF
Replace "IF YES" with the actual condition you want to use.
PATTERN_TABLE:FID_NAME_OF_TABLE_PATTERN = "NAME_OF_TABLE"
P.s. You can also use the FeatureID of the table pattern, but using the name is more clear.
We are using a more complicated way to drive all the dimensions of a table pattern.
Excel (Step 1)
We use Excel to calculate the dimensions of the table pattern, then with a small VBA macro we create the "ptb" file which Creo uses.
A "ptb" file starts with this line:
Then the rows with the information of the table pattern.
Creo (step 2)
We recorded a mapkey which replaces the existing table pattern with the one we have created in Excel. I first rename the existing table pattern, then import the new table, active the new table, then delete the old table.
Complicated as I said 🙂
Maybe this topic will help you: Regenerate pattern table vb api