Jump to content

Create On-Demand data table to store marked data points using C#


Georgi Koemdzhiev

Recommended Posts

Hello, I am trying to figure out if it is possible to create an On-Demand data table using C# (I am planning to create a CustomTool). What I am trying to do is basically programmatically add a new On-Demand data table that is set up to store only what the user marks on a visualisation (limited by Marking). Below is my attempt at creating that table but it doesn't seem to work, can somebody more experienced taka e look at it

 

protected override void ExecuteCore(AnalysisApplication context)

{

var d = context.Document;

var dt = d.Data.Tables["Wells"];

var ds = new DataTableDataSource(dt);

var dataFlowBuilder = new DataFlowBuilder(ds, null);

var newTable = dataFlowBuilder.Build();

 

d.Data.Tables.Add("NewTableName", newTable);

}

.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...