Parents
  • Hey all,

    so under the directory "T:\Projects\projectsv12\APACHE\VARANUS\variso\std" i have an isometric option file. (a few actually).
    is there a way to justify and/or align the text to middle and centre?
    coz when you position an attribute text it has only the pos and the character height:
    TextPosition :PROJECT_TITLE X 400mm Y 27mm CharHeight 3.5mm

    In draft you would put:
    JUST Centre
    ALIGN HBODY

    Any thoughts?
Reply
  • Hey all,

    so under the directory "T:\Projects\projectsv12\APACHE\VARANUS\variso\std" i have an isometric option file. (a few actually).
    is there a way to justify and/or align the text to middle and centre?
    coz when you position an attribute text it has only the pos and the character height:
    TextPosition :PROJECT_TITLE X 400mm Y 27mm CharHeight 3.5mm

    In draft you would put:
    JUST Centre
    ALIGN HBODY

    Any thoughts?
Children
  • Add next function (with name aligniso.pmlfnc) into your pmllib:

    define function !!aligniso (!inputtext is string, !x is real, !y is real, !charheig is real, !alignparam is string)
        !align = !alignparam.upcase()
        !z = !charheig * 0.7
        !l = !inputtext.length()
        if !align eq |R| then
            !x1 = !x -!l * !z
        elseif !align eq |C| then
            !x1 = !x - ( !l / 2 ) * !z
        else
            !x1 = !x
        endif
        !output = |TextPosition '$!inputtext' X $!x1 Y $!y charheight $!charheig|
       $!output
    endfunction

    In Option file use !!aligniso ('Project Title', 400,27,3.5, 'r'), instead of TextPosition ':PROJECT_TITLE' X 400mm Y 27mm CharHeight 3.5mm

    'r' - for right just

    'c' - for center just

    and '' - for left just