• Not Answered

vertical text in deltaV operate

has anybody here implemented and used this library from MS EXCEL to orient the text to be vertical in DeltaV Operate?

http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.namedrange.orientation.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2

5 Replies

  • The idea is to have the text orientation functionality in DeltaV Operate.
  • In reply to Mel Acosta:

    Hi,

    I do not think the code will work for DeltaV. Reasons:
    1. Excel objects (NamedRange for cells) have property "Orientation". DeltaV Operate objects have property "Rotation". Text object does not support the rotation property either.
    So, when you try to run the code, it will give error "Object doesn't support this property or method".
    2. VBA has event based code execution. On what event will you run this code?

    Only way I have known to keep vertical text is to set text object properties for "MaxCharactersPerLine = 1" & "MaxLines = 100". But this does not rotate the characters & hence sometimes difficult to read. But this can be used for datalinks as well.

    Other simple way is to keep bitmap of rotated text. But this does not look good if the bitmap distorts.

    If the requirement is only for single character /small fixed text rotation, then it is also possible to build the characters with the polyline/polygon (e.g. "M") & rotate this object. But it is very hard to create the characters like this in required font.

    Best Regards,
    Amod.
  • In reply to amodbobade:

    Thanks for the detailed information, . :)

    Best Regards,

    Rachelle McWright: Business Development Manager, Dynamic Simulation: U.S. Gulf Coast

  • In a previous job I created a dynamo that would produce sideways text for a cause & effect display. The basic steps that the VB code would take are:
    -populate a text box
    -copy it as a bitmap
    -save the paste buffer to a .bmp file in a temporary folder
    -rotate the content of the .bmp file (using bytewise manipulation)
    -insert the modified .bmp file on the graphic

    I wrote it mostly as a proof of concept, but it was actually implemented on one project. I wouldn't be surprised if it ended up in Emerson's PCSD library somewhere.

    The bad news is I don't have the code anymore since changing jobs. If there's enough interest I can see if I can build it again.

    Regards,
    Tom
  • In reply to Tom Grusendorf:

    Awesome, thanks :)

    Best Regards,

    Rachelle McWright: Business Development Manager, Dynamic Simulation: U.S. Gulf Coast