Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Export Text ( Placards) from Catia to Excel

Status
Not open for further replies.

vinodnx7

Industrial
Jan 21, 2010
19
0
0
CA
I am looking Micro to export all the text from Catia to Excel. I am attaching draft image for your reference, I want export the text in Excel to validate the spelling mistake for bilingual placard. created induvial placard in details view refer Placards 1. an
Placards_hyct2n.png
y help will much appreciated.
 
Replies continue below

Recommended for you

Hello OP.
Sorry for late reply

Sub Export_Drawing_Texts()

Path = "D:\Book5.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"

Set myRange = objExcel.Range("B1")

Dim myDr As DrawingDocument
Set myDr = CATIA.ActiveDocument

Dim mySheet As DrawingSheet
Dim myView As DrawingView
Dim myText As DrawingText

For Each mySheet In myDr.Sheets

For Each myView In mySheet.Views

If myView.Texts.Count > 0 Then

For Each myText In myView.Texts


myRange.Offset(0, 1).Value = myText.Name
myRange.Offset(0, 2).Value = myText.Text

Set myRange = myRange.Offset(1)

Next
End If

Next

Next

End Sub
 
Status
Not open for further replies.
Back
Top