Page 1 of 1
Still having trouble
Posted: Fri Oct 03, 2008 9:46 am
by terryb45
Maybe it is my age and decaying grey cells but I am still having trouble generating a new symbol and getting it to appear in the symbol list on my plot. You did a superb step by step guide to producing a new symbol and I am wondering if you could do the same for the rest of the process. I have read everything you have written on here but I guess I am missing something as it just doesn't happen for me.
I suspect I might not be alone. . . . .
Posted: Sun Oct 05, 2008 4:43 pm
by admin
This step by step guide to requires the use of LXSymbolsEditor and LXKey editor which are part of LXTools.
It is important to understand the relationship of a symbol file, a key file and an LXFree plot. A symbol file is a collection of lines and curves that define the outline of a symbol graphic that is eventually drawn by LXFree. A key file associates a symbol with its meaning. This includes the name of the symbol and additional data such as lamp and color frame that describe the actual instrument that a symbol represents. A key file is a collection of these entries.
Each plot created by LXFree has its own key that is saved with the plot. There is a large default key that contains many more entries than a single plot would ever use. The key file mechanism allows you to create a smaller key of only the symbols you are interested in and use that in a plot. When a key file is read into an LXFree plot (by selecting it from the popup menu in the Inspector's Symbol tab) it replaces the plot's current key. If any symbols in the previous key are being used in the plot, those entries are retained even if they are not found in the new key file.
To create a symbol and use it in an LXFree plot, start by launching LXSymbolsEditor. An empty symbols file window will open when LXSymbolsEditor starts up. Choose "Add Symbol" from the "Symbol" menu.
A symbol is a collection of lines and curves which define the outline of the graphic. You add to this collection by using the "Add Point" command from the "Points" menu. Drawing always starts from the first "Move To" point in the list so essentially, the first point should always be a "Move To". For sake of this discussion you can either create your own symbol or enter the following four points:
Move To, 20 , 0
Line To, 0, 20
Line To, -20, 0
Line To, 20, 0
This creates a simple triangle graphic. The next step is to assign the new symbol an ID which uniquely distinguishes it from all others. All the built-in symbols in LXFree have numeric IDs. To avoid conflicts, any custom symbol must contain at least one non-numeric character. For our example, enter "T1" in the ID field. (Be sure to hit the enter or return key after typing to be sure that the ID is entered.)
Save the new symbol file as something like "MySymbol.lxsymbols". The default location for this file is the "lx/symbols" folder in your user application support directory. This is the location where the LXKeyEditor will be able to find it. So, be sure to save it there.
The next step is to use the symbol in a key entry. To do this, open LXKeyEditor. An new untitled key window will open.
You must decide on the behavior of the kind of entry you want to add. Different kinds of lights have different characteristics. For example, a difference between a fixed focus and zoom ERS is that there is no variable beam and candela information for a fixed focus instrument.
For the purpose of the example, choose "Add New Leko / ERS" from the "Entries" menu.
There are two ways to associate the symbol we created with this new entry. The most direct is to enter "T1" (or whatever ID you chose) in the "Symbol ID" field in the table. Or, you can click the "Change Symbol..." button. If you choose the latter, you will find your symbol at the bottom of the choices after all the built-in symbols. (If you do not see your symbol, the file is not in the correct directory for LXKeyEditor to find it).
Once you've assigned the symbol to your new key entry, you can fill in the rest of the data fields. The most important being the "ID" field. Most of the IDs of key entries that are included with LXFree are based on the model number of the instrument represented. There is no enforced policy to prevent conflicts. So, the best thing is to give your key entries an ID that includes something like your initials. For the example use an ID such as "myT1".
Save the new key file as something like "myT1.lxkey". The default location for this file is the "lx/keys" folder in your user application support directory. This is the location where the LXFree will be able to find it. So, be sure to save it there.
To use the new symbol/key entry in a plot, open LXFree and go to the Inspector's symbols tab. Use the popup menu to switch to the key you created. You should then be able to select and draw the symbol.
As mentioned above, selecting a new key file using the menu in the symbols tab switches the plot to using the new key but does not remove any key entries currently in use. This allows you to build up the key for a plot to contain only the entries you want to use. You also can use LXKeyEditor to copy and paste entries from different files into a custom file.
One important thing to note is that a plot saves its own key. Key files are a means of transporting and sharing a particular group of key entries. But, altering a key file has no effect on any plot until it is used through the symbols tab menu.
Similarly, a key entry retains a copy of a custom symbol and that symbol is saved and transported as a part of the key. This insures that the key and the symbol are kept together--there is no danger of the symbol file being seperated from the key that uses it. But, this also means that any changes made to a symbol file will not be reflected in a key file until the symbol is re-associated with the entry that contains it. This is done by entering the symbol ID or using the "Change Symbol" button in LXKeyEditor. Either of these actions explicitly include a new copy of the symbol in the key entry.
IDs are how LXFree identifies and distinguishes between symbols and key entries. Because this is critical to both processes, the latest versions of LXSymbolsEditor and LXKeyEditor now check IDs to insure they are not left blank.
Posted: Sun Oct 05, 2008 7:16 pm
by terryb45
Eureka! Thank you for that. I think some of my troubles may have been as simple as not hitting return after entering the ID code. I am sure this will have been of interest to others who might not have been brave enough to admit that they were having problems. This is an excellent piece of software and I commend you for an excellent job.