×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Table Editing via macro?
3

Table Editing via macro?

Table Editing via macro?

(OP)
I need to create a rev table using a macro. I've seen a few Rev tools and BOM tools that can modify tables and i think it makes for a better list that is more easily modified. but i have not ssen the code for those. All the ones i have found will draw the lines and insert text boxes. for the time being i am going to use this method. But, if any one can give me some code for tables that i can work with It would be greatly appreciated.

RE: Table Editing via macro?

2
Hi

Create a drawing table

CODE --> CATScript

Sub CATMain()
    '-----------------------
    ' ACCESS DRAWING
    '----------------------
    ' retrieve drawing document infrastructure
    Dim DrwDoc As DrawingDocument
    Set DrwDoc = CATIA.ActiveDocument

    Dim shActiveSheet As DrawingSheet
    Set shActiveSheet = DrwDoc.Sheets.ActiveSheet

    Dim vwActiveView As DrawingView
    Set vwActiveView = shActiveSheet.Views.ActiveView
    '------------------
    ' CREATE TABLE
    '-----------------
    ' table position: 350, 150
    ' number of rows equal to 10
    ' number of columns: 4
    ' row height: 20
    ' column width: 50
    Dim tblTable As DrawingTable
    Set tblTable = vwActiveView.Tables.Add(350, 150, 10, 4, 20, 50)

    ' set table caption
    tblTable.SetCellString 1, 2, "X"
    tblTable.SetCellString 1, 3, "Y"
    tblTable.SetCellString 1, 4, "Z"
    
    End Sub 

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: Table Editing via macro?

(OP)
Thank you. I will give this a pin when i get done with the job I'm on.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources