Text Alignment in Expedition

Version 2

    Author (required): Al Layson   

     

    Platform/Format: VBScript, Form

     

    Use case description (required)

    This script (AlignText.efm) will align selected Fabrication & UserLayer texts per the formats shown in the button icons. Selecting a format will change the "X :" to a "Y :" or visa versa, depending on whether alignment will be to the same X (Horizontal Justification) or same Y (Vertical Justification) of all the selected text. Users can manually enter an X or Y Coordinate value in the numeric entry box, or enter a mousedown in the layout. However, the numeric entry should be preceeded by a Format selection because a Format selection may clear the numeric entry value if the new selection's justification (Horizontal X) differs from the previous (Vertical Y). If text is previously selected when attempting to define the numeric entry wth a mousedown, the coordinate of the closest selected text (it's text origin) is captured (this is signified by the Move Cursor). If you wish to enter a mousedown location other than those selected texts location, before selecting the texts, execute a mousedown at the location you wish to enter into the numeric entry box.

     

    AlignTex2t.jpg

     

     

    Location of the zip file: http://communities.mentor.com/docs/DOC-1890

     

     

     

    Disclaimer

    Copyright 2010 Mentor Graphics Corporation. All Rights Reserved. Recipients who obtain this code directly from Mentor Graphics use it solely for internal purposes to serve as example Java or Java Script plugins. This code may not be used in a commercial distribution. Recipients may duplicate the code provided that all notices are fully reproduced with and remain in the code. No part of this code may be modified, reproduced, translated, used, distributed, disclosed or provided to third parties without the prior written consent of Mentor Graphics, except as expressly authorized above. THE CODE IS MADE AVAILABLE "AS IS" WITHOUT WARRANTY OR SUPPORT OF ANY KIND. MENTOR GRAPHICS OFFERS NO EXPRESS OR IMPLIED WARRANTIES AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR WARRANTY OF NON-INFRINGEMENT. IN NO EVENT SHALL MENTOR GRAPHICS OR ITS LICENSORS BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS) WHETHER BASED ON CONTRACT, TORT OR ANY OTHER LEGAL THEORY, EVEN IF MENTOR GRAPHICS OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.