cancel
Showing results for 
Search instead for 
Did you mean: 

Create annotation with text attribute <>

Pioneer
Pioneer

When I create annotation with specified font style "barcode" it will label as <F26>. But this value will change when I use  another drawing file....how can I know this value before use?

 

Thanks

 

Terry

1 REPLY

Re: Create annotation with text attribute <>

Genius
Genius
There is a font table that is different for any part. You can search for a font like this:
For i = 1 To workPart.Fonts.GetLength()

Try
theSession.LogFile.WriteLine("Number: " & i & vbTab & "Name: " & workPart.Fonts.GetFontName(i))

If workPart.Fonts.GetFontName(i) = "ISOCPEUR" Then

isNotISOCPEUR = False
tmpFontIndex = i
theSession.LogFile.WriteLine("")
theSession.LogFile.WriteLine("ISOCPEUR found at index: " & i)
theSession.LogFile.WriteLine("")
Exit For

End If

Catch
theSession.LogFile.WriteLine("Error found for Font Number: " & i)
End Try

Next I

If it cannot be found, you can add it by using this line "tmpFontIndex = workPart.Fonts.AddFont("ISOCPEUR", FontCollection.Type.Standard)"

Then you have the index number. If you change your template files and add the font it is always available...