Expedition: Import Txt

Document created by al_layson on Dec 17, 2009Last modified by al_layson on Aug 24, 2012
Version 10Show Document
  • View in full screen mode

This script (ImportTxt.efm) will import an unformatted text file (txt - although the txt extension is not required). This will create each line of text as one text draw object in Expedition on a user defined layer. All resulting text objects will be selected allowing you to execute the "Move Object" command to move all texts to a desired location. The "Move Object" command is available in Draw Mode, hence the script will check the current mode and will exit if not currently in Draw Mode, asking you to set Draw Mode and then re-execute. This is to prevent loss of selection when the mode is changed.

There can be a difference in the GUI depending on what is available from the system:

1) If on WindowsXP and the commondialog is available then you will see a browse button next to the filename entry. Else, the browse button is disabled and user must enter the filename manually.

2) If the script is able to extract the Font Names from the registry, the user will be presented with a pulldown for font selection, else the font name will need to be manually entered (just a text entry box will be presented). If the script indeed presents a pulldown of Font Names, be aware that some font names are called by names different from that in the registry and if so, those fonts may not work (accepted by Expedition). If this is the case, use a known good font then change the font using the properties dialog afterwards.

Undo is enabled.


Version 2: Changed Font Input from Drop List to Drop Down type, which allows users to manually enter a font name if it doesn't appear in the drop down list (I.E. vf_* fonts). However, this input cannot be checked unless another gadget is changed. Hence, if you have problems enabling the "Import" button after changing the font, change a parameter/gadget other than the Font.


Version 3: Fixed bug related to checking numeric values (where "." is entered as first character) and now ensures the user layer and its section is displayed.


Version 4: Fixed bug related to starting y value.


Version 5: Added Expedition Fonts (SDD_HOME\standard\config\pcb) to the Listed Registration Fonts.