Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modification of table column size and fonts

Status
Not open for further replies.

VojtaR

Automotive
Apr 2, 2020
20
CZ
Hello all,

I would like to use a Table from CSV function, but after insertion I would like to modify column sizes of that table.

What I would expect: I select the table --> run the macro --> table modified
In the macro there would be that column 1 should be XXmm size; column 2 XXmm and so on.

Is anyone able to do that? I have tried record macro, but resizing was not recorded.

Thank you in advance
 
Replies continue below

Recommended for you

Well, thank you for that... if I would be skilled in making macros, that would help, but I have no knowledge in that. I can only modify some macro by try and error. I have not found anything regarding modification of table on this forum... Could you please help, at least how do I modify one column as an example and the rest I can do by myself. I just do not know how to define in drawing and tell macro that it should work with selected table.

Thank you for your time.
 
VojtaR... did you even try to google for Little Cthulhu's tip?
literally, the first hit on that list... "vbscript drawing table catia" in Google


regards,
LWolf
 
Select drawing table and run:

Code:
Dim tbl: set tbl = CATIA.ActiveDocument.Selection.Item(1).Value
tbl.SetColumnSize 1. 100 ' column index, size (0 for autosize)
tbl.SetRowSize 1. 100 ' column index, size (0 for autosize)
 
This is so easy to do manually - why waste your time writing a macro?

Just double-click on the table to edit it, click one of the corners to select the entire table, and choose a different font.

To change column width; double-click on table, right-click to select column and choose SIZE to type in a new width
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top