Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Create annotation with text attribute <>

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
Solution
Solution
Accepted by topic author terchan1
‎06-06-2016 06:02 AM

Re: Create annotation with text attribute <>

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...