You need to use "GetDataset" and "SetDataset" to manipulate datasets.
GetDataset retrieves the Dataset object, you make your changes then you use SetDataset to update it in the Dataset collection.
So far so good.
I use "GetDataset" and "SetDataset" to manipulate my own created PIExpressionDatasets.
It works fine.
But, anybody knows which source code object can give me the information about the dataset is in use?
See also: Tools -> Datasets -> Show Use ...
A Dataset has a DataPoints collection, the count gives you the usage count:
Then you can just cycle the DataPoints items to get the symbol or symbol name/type/...: