Text rotation in labels

This topic contains 4 replies, has 3 voices, and was last updated by  Bruce Walker 1 year, 3 months ago.

  • Author
    Posts
  • #4756

    James Murray
    Participant

    I am wondering if it is possible to force text to remain level regardless of the Label Rotation: Orientation setting. (Similar to rotating text in an ordinary object depending on the state of V~ and W~) Does the parameter AC_bLabelAlwaysReadable have something to with it?

    James M

  • #4757

    Péter Baksa
    Keymaster

    Hi,

    Read about controlling labels here, label ac_ parameters here, label globals here.
    If you need it to remain horizontal independent of plan rotation, use the “View_Rotangle” request.

    Péter Baksa
    Library Platform, Software Engineer
    GRAPHISOFT SE

  • #4774

    Bruce Walker
    Participant

    Here is some sample code I find works. It also accounts for view rotation. ‘txt_font’, ‘txt_size’ and ‘txt’ are parameters:

    DEFINE STYLE 'txt1Style' txt_font, txt_size, 5, 0
    
    !View rotation angle
    rrr = REQUEST ("View_Rotangle", "", angleViewRot)
    totRot = (SYMB_ROTANGLE + angleViewRot)
    IF totRot > 360 THEN totRot = totRot - 360
    
    STYLE txt1Style
    
    TEXT2 0, 0, txt

    www.brucepwalker.com
    https://www.mindmeister.com/65450406

    AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
    NVIDIA GeForce GTX 1060 8Mb

  • #4829

    James Murray
    Participant

    That adjustment doesn’t seem to correct for when the label is at an angle, see image.

    James M

  • #4834

    Bruce Walker
    Participant

    The text is still orienting correctly within the context of the label – it’s the label itself that is rotated. You will need to use the LABEL_ROTANGLE (I think) to always keep the text horizontal. Haven’t looked into it myself, but that’s where I’d start.

    www.brucepwalker.com
    https://www.mindmeister.com/65450406

    AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
    NVIDIA GeForce GTX 1060 8Mb

The forum ‘Documentation elements, text handling’ is closed to new topics and replies.