Thread: UTA API - How to program TE


Permlink Replies: 7 - Pages: 1 - Last Post: Jun 17, 2010 6:51 AM Last Post By: OnlyOne
jszlatki

Posts: 14
Registered: 08/18/09
UTA API - How to program TE
Posted: Jun 15, 2010 3:56 AM
Click to report abuse...   Click to reply to this thread Reply
Hi!

I don't find a topic that could summarize all the problems with the UTA API.

I would have a question:
I would like to handle a symbolTable for my parameters. I would like to refresh it from a parameterfile automatically.
Unfortunately I don't know the way how should I do it.
At the moment I'm able to read or delete a given value from an external symbol table, and save the changed symbol table with: UtaTableSave(). Unfortunately there are a lot functions what about I don't have any documentation e.g.: UtaPbDefSetParm, UtaPbDefRemoveParm... Some of them you can easily use, but others I can't use at all.
Can sombody send me an example about how to use a symbolTables (r/w/app/...) in a safe way? Or does somebody have more detail documentation about the UTA-API as the TE manual?

Thanks in advance for your help!
Regars
jszlatki
OnlyOne

Posts: 110
Registered: 07/26/07
Re: UTA API - How to program TE
Posted: Jun 16, 2010 4:48 AM   in response to: jszlatki in response to: jszlatki
Click to report abuse...   Click to reply to this thread Reply
Do you want to do this in an external program?
Or direct in TestExec?
In Testexec simply use the Echo-Integer-action to write/update values into symbol-table.
What language do you want to use to program the API?
jszlatki

Posts: 14
Registered: 08/18/09
Re: UTA API - How to program TE
Posted: Jun 16, 2010 5:55 AM   in response to: jszlatki in response to: jszlatki
Click to report abuse...   Click to reply to this thread Reply
With an external program. I use MSVS2008. I've already used this API. In TE this w/upd method is already known ;).

I could do it with TE e.g echo-integer, but I think it would be more elegant if I do it my action. There is a parameter file. I would like to get the values from it and write them into a symbolTable and save it. I'm able to read/save/del an item from a symbolTable, but I don't write an exist item.
OnlyOne

Posts: 110
Registered: 07/26/07
Re: UTA API - How to program TE
Posted: Jun 16, 2010 6:49 AM   in response to: jszlatki in response to: jszlatki
Click to report abuse...   Click to reply to this thread Reply
this is how to write to TestPlanGlobals:


"
...
...cut...
...
"
jszlatki

Posts: 14
Registered: 08/18/09
Re: UTA API - How to program TE
Posted: Jun 16, 2010 10:16 AM   in response to: jszlatki in response to: jszlatki
Click to report abuse...   Click to reply to this thread Reply
It seems to be good. Unfortunatelly I don't have these functions. Do you have an extra API? I have only the default library.
OnlyOne

Posts: 110
Registered: 07/26/07
Re: UTA API - How to program TE
Posted: Jun 17, 2010 3:49 AM   in response to: jszlatki in response to: jszlatki
Click to report abuse...   Click to reply to this thread Reply
Hm thats right, the function is called UtaPbSetIn32
jszlatki

Posts: 14
Registered: 08/18/09
Re: UTA API - How to program TE
Posted: Jun 17, 2010 5:45 AM   in response to: jszlatki in response to: jszlatki
Click to report abuse...   Click to reply to this thread Reply
Yes thanks! I found it before dinner...:) it works well...I would like to write it, but you overtook me...:)

I write the full solution. So others can see it:

IUtaInt32 hData = 200;
HUTAPBDEF MyTable = UtaTableRegFindTable("NameOfMySymTable", false);
UtaPbSetInt32((HUTAPB)MyTable, "var_name", hData);

UtaTableSave(MyTable,"NameOfMySymTable.sym");

Thanks a lot for your help!
OnlyOne

Posts: 110
Registered: 07/26/07
Re: UTA API - How to program TE
Posted: Jun 17, 2010 6:51 AM   in response to: jszlatki in response to: jszlatki
Click to report abuse...   Click to reply to this thread Reply
Thanks for sharing and good to hear that it works.

Point your RSS reader here for a feed of the latest messages in all forums