I'm trying to write prioprietary, local extension command in Python 3. I successfully connected Visual Studio Code to SPSS. However, when I try to get variable list of the active dataset I always receive nothing.
import spss
spss.StartDataStep()
print(spss.ActiveDataset()) # returns "*" in VSC
print(spss.GetCaseCount()) # returns 0 in VSC
spss.EndDataStep()
When I tried to run the same code in Python 3 IDLE opened from SPSS - still the same. However, when I run the code above from `begin program`-`end program` block - everything's fine.
Is there any way to write code in VSC or at least IDLE? I mean in terms of writing extensions syntax editor is not convenient.
Note: when I use `SpssClient` I can get, for example, active dataset name. Nonetheless, as far as I know, there is no way to access other, useful dataset properties (like variables list) using this class. Is it in fact possible and I'm simply missing something?
------------------------------
Konrad Gałuszko
------------------------------
#SPSSStatistics