In the design kit development manual of ADS under the Design Kit Tutorial, there is a item definition code given for a sample_res resistor subcircuit.(Page 234 of 2019 manual or Pg 147 of 2011 manual)(manual is available on website)
In that code there are a few AEL functions whose explanation is not given anywhere (either AEL manual or keysight website), the unknown functions are bolded:
decl formDefP = dm_find_library_form("SampleKit",
checkVal=SampleKit_v1_parm_checkRange("Resistance", R, nth(0,
rangeList), nth(1, rangeList), "Ohm");
In the attached image (a part of this code),
1) the code marked in yellow, passes the same value in R using pcb_get_mks(), then what is the purpose of writing it twice.
2) the code marked in blue under two different 'if' conditions serves the same purpose logically then what is the need for two different conditionals.
3) the code marked in green, the first pcb_set_mks passes the value of l in micrometers and the second pcb_set_mks overwrites it with l in meters. What is the purpose of this?
It'll be a great help if someone could answer this. Thankyou.
email@example.com - contact me if more info is needed to understand my question.