×
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

Export Catia V5 Drawing Text

Export Catia V5 Drawing Text

Export Catia V5 Drawing Text

(OP)
Hi Friends,

Please help me to copy all the Texts on Active Drawing sheet & Paste it to Excel.
Is it possible?

Thanks in advance

Regards
Datta Raja

RE: Export Catia V5 Drawing Text

something to start...

CODE -->

Sub Export_Drawing_Texts()
    
Path = "C:\Alex\Book1.xlsx"


Set objExcel = CreateObject("Excel.Application")
Set workbook = objExcel.Workbooks.Open(Path)
workbook.Application.Visible = True
workbook.Parent.Windows(1).Visible = True


objExcel.Cells(1, 1).Value = "Text Name"
objExcel.Cells(1, 2).Value = "Text Value"

    Dim oDrawing As DrawingDocument
    Set oDrawing = CATIA.ActiveDocument
    
  
    Dim oSheets As DrawingSheets
    Set oSheets = oDrawing.Sheets
    
For a = 1 To oSheets.Count

    Dim oSheet As DrawingSheet
    Set oSheet = oSheets.Item(a)
    
    Dim oView As DrawingView
    Set oView = oSheet.Views.Item(1)
    oView.Activate
    
     Dim oText As DrawingTexts
Set oText = oView.Texts

 For i = 2 To oText.Count
   Set ThisDrawingText = oText.Item(i)
     objExcel.Cells(i, 1).Value = ThisDrawingText.Name
   objExcel.Cells(i, 2).Value = ThisDrawingText.Text
  
    Next i
    
Next a
End Sub 

RE: Export Catia V5 Drawing Text

(OP)
Hi AlexLozoya,

Thanks a Lot..for your quick reply.
It is working..

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