Set mySketchText = Part.InsertSketchText(0, -0.003, 0, "*", 0, 0, 0, 100, 0)
To insert my text but comes in as a set size, don't know how to adjust it. I have read that "<r65>*</r>" can be used to rotate the text, wonder if there is something like this for the size/font also.
Check SetTextFormat method.
Thanks for your reply, I cannot get this to work in the part document as for some reason solidworks doesnt seem to treat text in sketch's as an annotation, works fine in a drawing document just not in the part sketch.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSkText As SldWorks.SketchText
Dim nTextFormat As SldWorks.TextFormat
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set nTextFormat = swModel.GetUserPreferenceTextFormat(SwConst.swDetailingNoteTextFormat)
nTextFormat.CharHeightInPts = 25 'Change height here
Set swSkText = swModel.InsertSketchText(0#, 0#, 0#, "Test", 0, 0, 0, 100, 100) 'Change text here, replace Test with required text.
swSkText.SetTextFormat False, nTextFormat