Answers

I believe the only way is using CB Open interface. CB Open interface is set of Control Builder interface functions , which are accessible from other user developed application for example in C# or in Excel VBA macro.An example of code reading Program ST code content :

// Create an object of the “CB Open Interface” classcb = new CONTROLBUILDERLib.CBOpenIF(); // Get an XML description of the program “MyProgram” from the// Control Builderstring XMLStr = cb.GetProgram("MyApp.MyProgram"); // Deserialize the XMLSTring into ObjectsProgram prog = ObjectFactory.DeserializeProgram(ref XMLStr); // Use the foreach statement in order to loop trough all objects in// the CodeBlocks collectionforeach (ICodeBlock icb in prog.CodeBlocks){if (icb.IsSTCodeBlock){ //cast to the interface STCodeBlockSTCodeBlock stcode = (STCodeBlock) icb;richTextBox1.Text += stcode.STcode;}else if (icb.IsSFCCodeBlock){ //cast to the interface SFCCodeBlockSFCCodeBlock sfccode = (SFCCodeBlock) icb; // work with the SFCCodeBlock's default interface} // else if ….. omitted in order to simplify the example}