I have a macro where I am taking text from a spreadsheet and using it to create text in a CATIA V6 drawing. I can get the text in fine and I can change the font size, but I can't get the .AnchorPosition method to work. I get the error message, "The method AnchorPosition failed."
'Creates text
Set Text1 = CATIA.ActiveEditor.ActiveObject.Sheets.ActiveSheet.Views.ActiveView.Texts.Add(CStr(Range("A1").Value), 0, 0)
'Set font size
Text1.SetFontSize 0, 0, 0.15 * 25.4
'vvv The macro fails here vvv
Text1.anchorPosition = catBottomCenter
'Creates text
Set Text1 = CATIA.ActiveEditor.ActiveObject.Sheets.ActiveSheet.Views.ActiveView.Texts.Add(CStr(Range("A1").Value), 0, 0)
'Set font size
Text1.SetFontSize 0, 0, 0.15 * 25.4
'vvv The macro fails here vvv
Text1.anchorPosition = catBottomCenter