Structure Viewer exposes a number of interfaces that allow macro scripts to control its behavior.
Structure Library is represented by the global object structureLibrary and implements IStructureLibrary interface. Use its methods to add, remove and locate structure definition files.
Structure Viewer is available as a global structureView object and implements IStructureView interface. Use it to bind and remove structures, control item visibility, copy data to the Clipboard or export it to CSV files.
Use the IStructureLibrary.newFile method to create new structure definition file and open it for editing. Use the IStructureLibrary.openFile method to open existing structure definition file for editing. An opened file is represented by ISourceFile interface.