Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 06:18:31 +0000



Post From: Accessing sc.Subgraph[].Arrays[][] from a different chart or study

[2013-07-24 22:15:58]
golding - Posts: 15
SC,

The documentation indicates that a subgraph's extra arrays are for internal use, but I would like to access them from a 2nd, different study on a different chart, coded in another DLL. So study 2 (scsf_study2) on chart 2 wants to read subgraph extra arrays internal to study 1 (scsf_study1), chart 1.

Does   sc.GetStudyArraysFromChart( chartNum, studyID, graphData ) return pointers to the subgraphs themselves (BaseData[x] ), without performing a physical copy from source to destination study?

The following code compiles, altho I haven't tested it. Assuming this is pointer-based, then the code should work and be much more expedient.

    sc.GetStudyArraysFromChart( chartNum, studyID, sgArrays15secAgent ) ;
    SCFloatArrayRef StudyArray = sgArrays15secAgent[0];  
    
    SCSubgraphRef sgRef = (SCSubgraphRef) sgArrays15secAgent[2];  
    SCFloatArrayRef myArray = sgRef.Arrays[0];

thx in advance,

JG