Hi All,
I'm fairly new to SKILL. I've spent a day trying to figure out an issue with my code but i've had no luck.
What I'm trying to do is write code to automatically set up a board file. The code creates a FORM that the user fills in. If i run the code from the command line i get the following error : "E- *Error* axlDBCreateText: argument #1 should be a string (type template = "tlggg") - nil" but if I execute the code one line at a time i do not encounter thiws error.
The variable (pn) is filled in by the user in a FORM. Here is the code from the FORM:
;board pn
fprintf(form "TEXT \"BOARD P/N: \"\n")
fprintf(form "TLOC 6 10\n")
fprintf(form "ENDTEXT\n")
fprintf(form "FIELD pn\n")
fprintf(form "FLOC 25 10\n")
fprintf(form "STRFILLIN 25 25\n")
fprintf(form "ENDFIELD\n")
In a different function I place a layer block symbol and then use user entered information to populate all the information into the symbol. Everything works until I hit this section of code:
TB = make_axlTextOrientation(?textBlock "5", ?rotation 0, ?mirrored nil, ?justify "center")
axlDBCreateText(pn, LineX:LineY, TB, "board geometry/logo", nil)
At this point I get the error mentioned above. I have gone as far as to test to make sure that pn is a string (stringp(pn)). I've even parsed pn and recreated the string. In either case I get the same error. If I comment this line out the script finishes without any errors. Also as i mentioned before if I execute the code one line at a time in the skill window I do not encounter the error.
FYI pn is set to "B7E45-80501"
Any help would be appreciated.
Thanks in advance,
Konstantin