I am having problems retrieving the value of a variable handle with the axl-functions.
data_session = ( axlCreateSession "data_session" )
data_sdb = axlSetMainSetupDB( data_session "data.sdb" )
foreach( param cadr( axlGetVars( data_sdb ) )
varHandle = axlGetVar( data_sdb param )
So, when you have the variable handle (varHandle in this case), how to retrieve its value? I can't find any axl-function that does it. When you use the axlPutVar you are allowed to give the value of the variable along with it, but I can't find any way to actually read the value. I am relatively new to SKILL, so please excuse me if there's a very simple solution to this.
session=axlCreateSession("data_session")sdb=axlSetMainSetupDBLCV(session "opamp090" "full_diff_opamp_AC" "adegxl")foreach(param cadr(axlGetVars(sdb)) varHandle=axlGetVar(sdb param) printf("var %L has value %L\n" param axlGetVarValue(varHandle)))
Note that the axlGetVarValue() function is currently not documented, but CCR 957111 has been filed to fix that.
In reply to Andrew Beckett:
Thanks a lot Andrew, that did the trick! But, I can't find that function in the result from
(which I tried when searching for that function).
Does listFunctions only list functions in the documentation?
In reply to skillprogramme:
Yes, it only lists public functions - which have documentation (it utilizes the presence in cdsFinder, which in turn originates from the documentation).
Ok, thanks again. I think I recall reading somewhere in here that the axl-functions are not so well documented and maintained. Would you recommend using them for modifying adexl-views at all, or should I maybe look into parsing the .sdb-files in another way (XML-parsing with Python or PERL fex.)? I also need to change the configviews corresponding to the ADEXL views. Is there some built-in functions for this?
The functions are well maintained, but the documentation needs some polish (I have a CCR on that).
You should definitely not parse the .sdb because the schema is not documented and may be changed to suit the needs of the tools - but the public API will be maintained to ensure that the data is consistent. The tool itself goes throught the same underlying API, so that is the right approach.
If you need to change the config views, there's an API for that - the "hdb" API.
Below is the error I obtain after executing
sdb=axlSetMainSetupDBLCV(data_session "ALL_PRIMITIVES" "ALL_PRIMITIVES_TB_TB" "schematic")
*Error* ddGetObjWritePath: argument #1 should be a ddUserType (type template = "b") - nil
I then checked if argument #1(data_session) is nil. But it is not as you can see below
Any ideas on what could be wrong ?
In reply to GaneshShamnur:
I immediately realized that the view being opened was "schematic" whereas it should be "adexl".