Forums › SA Series Discussions › Error when getting sweep results with API › Reply To: Error when getting sweep results with API
Andrew
Hello akarthikeyan,
I apologize, I don’t have much experience with ctypes or Python but I can try to help.
It doesn’t look like you are creating a proper array to pass to our API. This line right here
min = ct.c_double(swlen.value)
It looks like you are simply create a single double, whereas you need an array of doubles. (This is an educated guess on my part)
Also, if you are calling GetSweep, you do not need to call GetPartialSweep. Unless you have specific reason to, you will only need GetSweep. GetPartialSweep is a method for retrieving a very long sweep as it is updating. You should start with simply GetSweep for now until you need this functionality.
There might be others who can be of further assistance.
Regards,
A.J.
