Macro (SVB) Programs Example - Launching a New Statistica Application
As discussed in Accessing Statistica Visual Basic Libraries, the Statistica Visual Basic function libraries are accessed by creating a Statistica.Application object. When launched from within Statistica Visual Basic, the current application is the one assumed by default, so the following two sets of statements are equivalent when run from within SVB:
Set x = Application Set a = x.Analysis(scBasicStatistics, _ Path & "\Examples\Datasets\exp.sta") and: Set a = Analysis(scBasicStatistics, _ Path & "\Examples\Datasets\exp.sta") However, if you want to launch a new Statistica application from within SVB you need to create a New Application: Sub Main Set x = New Application Set a = x.Analysis(scBasicStatistics, _ Path & "\Examples\Datasets\exp.sta") '... '{Additional code, analyses} '... End Sub This program will launch the Statistica Basic Statistics module (library) and open file Exp.sta in the respective subdirectory.
Copyright © 2021. Cloud Software Group, Inc. All Rights Reserved.