Hi everybody,
I'm just running a macro in Catia V5 R19 to fill a title block with the properties and everithing. All is working fine except the text color. I need different colors in some texts but it doesn't work. I think the code for the color is wrong but I don't know in which formar I do have to write it. I've tried RGB, Hex, Decimal, etc. The code I'm using is the next and I have to use the color white (255, 255, 255) and cyan (0, 255, 255).
Thank you!
I'm just running a macro in Catia V5 R19 to fill a title block with the properties and everithing. All is working fine except the text color. I need different colors in some texts but it doesn't work. I think the code for the color is wrong but I don't know in which formar I do have to write it. I've tried RGB, Hex, Decimal, etc. The code I'm using is the next and I have to use the color white (255, 255, 255) and cyan (0, 255, 255).
Thank you!
'----PART NUMBER----
Set MyTextPartNo = MyDrawingViews.ActiveView.Texts.Add("HOLA", 25, 199)
MyTextPartNo.Name = "TitleBlock_Text_EnoviaV5_Effectivity"
MyTextPartNo.SetFontSize 0, 0, 3
MyTextPartNo.SetFontName 0, 0, "Century Gothic (TrueType)"
MyTextPartNo.AnchorPosition = catMiddleLeft
DrwTexts.GetItem("TitleBlock_Text_EnoviaV5_Effectivity").Text = ProductDrawn.PartNumber
'----COLOR PART NUMBER----
Set MyTextPartNoColor = DrwTexts.GetItem("TitleBlock_Text_EnoviaV5_Effectivity")
MyTextPartNoCol =25500
MyTextPartNoColor.TextProperties.Color = MyTextPartNoCol
MyTextPartNoColor.TextProperties.Update
End Sub
Set MyTextPartNo = MyDrawingViews.ActiveView.Texts.Add("HOLA", 25, 199)
MyTextPartNo.Name = "TitleBlock_Text_EnoviaV5_Effectivity"
MyTextPartNo.SetFontSize 0, 0, 3
MyTextPartNo.SetFontName 0, 0, "Century Gothic (TrueType)"
MyTextPartNo.AnchorPosition = catMiddleLeft
DrwTexts.GetItem("TitleBlock_Text_EnoviaV5_Effectivity").Text = ProductDrawn.PartNumber
'----COLOR PART NUMBER----
Set MyTextPartNoColor = DrwTexts.GetItem("TitleBlock_Text_EnoviaV5_Effectivity")
MyTextPartNoCol =
MyTextPartNoColor.TextProperties.Color = MyTextPartNoCol
MyTextPartNoColor.TextProperties.Update
End Sub