Great, much better!
I didn't find the way of putting the variable in the following code...
selection1.Search "CATDrwSearch.DrwText.TextString= ____ "
Actually, I have to put a string followed by the variable, anyway... now works perfectly.
Thank you very much Berto.
Thank you for answering but I have the same problem...
What I'm trying to do is put in red only the word I've just written.
Sub InsertText()
Set MyDrawingDoc = CATIA.ActiveDocument
Set MyDrawingSheets = MyDrawingDoc.Sheets
Set MyDrawingSheet = MyDrawingSheets.ActiveSheet
Dim...
Hello all,
I'm trying to set the red color on a text I have added with the following code taken from VBA help:
Property Color( ) As long
Returns or sets the color of the drawing text.
Example:
This example sets the Color type of the MyText drawing text to red
redCol =-16776961...
Hello, thanks for the replies!
I fixed the problem with the following code:
For i = 1 To filefolder.Files.Count
Dim IFile
Set IFile = filefolder.Files.Item(i)
If InStr(IFile.Name, ".CATDrawing") <> 0 Then
Dim Doc
Set Doc = CATIA.Documents.Open(IFile.Path)
Set PartDocument1 =...
Hello all,
I'm trying to create a macro which run a sub macro in all drawings I have in a specific folder, opening all drawings I have, running the submacro and closing them with the following code:
For Each MyFile In MyFiles
If MyFile.Type = "CATIA Drawing" Then
MyFile.Open 'ERROR...