Option Explicit
Sub CATMain()
Dim doc as DrawingDocument
set doc = CATIA.ActiveDocument
Dim view as DrawingView
set view = doc.Sheets.ActiveSheet.Views.Item(2) ' 1 - background view, 2 - main view
Dim txt as DrawingText
Set txt = view.Texts.Item("Text_01")
txt.Text = "My new text"
End...
Option Explicit
Sub CATMain()
Dim doc as DrawingDocument
set doc = CATIA.ActiveDocument
Dim view as DrawingView
set view = doc.Sheets.ActiveSheet.Views.Item(2) ' 1 - main view, 2 - background view
Dim txt as DrawingText
Set txt = view.Texts.Item("Text_01")
txt.Text = "My new text"
End...
LWolf with the code I posted above I can get to the value of the text box, by searching it in the drawing and changing it to something else. What I'm not able to do is select the text box itself to change what's inside it. Till now with no success.
The number inside doesn't serve any purpose...
I've tried this and it doesnt work. I'm sure there's something really obvious wrong with it.
Language="VBSCRIPT"
Sub CATMain()
CATIA.ActiveDocument.Selection.clear
Set drawingDocument1 = CATIA.ActiveDocument
Set drawingSheets1 = drawingDocument1.Sheets
Set drawingText1 =...
Here's the titleblock.
Little Cthulhu I've tried your code and it ran but didnt change anything whatsoever.
I pretend to use this titleblock as a background view everytime we need it for a new product. Using page setup to get it. I've tested doing this and using the "Insert Object Resolution"...
I do have text boxes and I figured I can get to them using the "Insert Object Resolution" tool. Now changing their value I'm still looking for that. Can you point me in the right direction?
Set drawingDocument1 = CATIA.ActiveDocument
Set drawingSheets1 = drawingDocument1.Sheets
Set...
I saw on another thread, ferdo you wrote:
"In this case you can write on the drawing sheet a text in a specific point location. Put a point where you want to add text, take the coordinates and do it in a separate macro. Your text still can be added in the title block field, is not neccessary to...
Sorry, I wasn't clear. I mean my company's title block is what I'd like to convert to code not the default samples of Catia.
Is there an automatic way to do this ? or it has to be written ?
Thank you ferdo and Lwolf for the quick responses
I used their custom title block as a background view in Page Setup. Is it possible to get this into the code ?
I'm having problems also in filling the gaps
Hello everyone ! my name is Andre. Im an IT student internshipping in a metal design factory working for the first time with Catia.
I'm working using Catia v5r26.
So here they have a custom title block someone made, and they use it for all the parts.
The thing is they have it in a...