Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Femap API - label/text size

Status
Not open for further replies.

TMEC

Aerospace
Jan 18, 2024
1
Hello,

I'm trying to make a modified version of the custom tool "switch background for printing". I've figured out how to "Erase Back" for labels, hide the legend, and make labels bigger, but the FVI_LABEL doesn't change the text size for the load and constraint labels. I know this is normally done in the performance graphics menu for labels but I can't figure out how to automate this. Here is a snip of what I've added/changed to the API tool:

' change color mode for labels to "view, erase back"
feView.ColorMode(FVI_LABEL) = 3
' to hide the legend
feView.Draw(FVI_VIEW_LEGEND) = False
' increase label font side to 4 (18pt)
feView.Label(FVI_LABEL) = 4
' can't figure out if this is the right object/property or not... but I'd like to change performance graphics size to 18pt as well
feView.Label(FVI_PERF_GRAPHICS) = ???

I also want to make my own tool to increase text size or decrease text size as a separate tool... but that's after I figure this one out.

Anyone here able to help?

Thanks.
 
Replies continue below

Recommended for you

Try this
Code:
Sub Main
    Dim App as femap.model
    Set App = feFemap()

    Dim v As femap.View
    Set v = App.feView

    Dim vID As Long

    Dim dHeight As Double
    Dim bBold As Boolean
    Dim bItal As Boolean
    Dim sFontName As String

    App.feAppGetActiveView(vID)

    v.Get(vID)

    v.GetFontData(dHeight, bBold, bItal, sFontName)

    'set the new Font Height
	dHeight = 20
    v.SetFontData(dHeight, bBold, bItal, sFontName)

    v.Put(vID)

    App.feViewRegenerate(0)

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor