Sometimes it is useful to define a global data element and have all schematics reference the same element. One case where this is useful is when all the schematics will be using the same substrate. You can add a substrate definition to the global data definitions and then all the elements in your schematics can use that substrate. Let's look at how we'd do this in from the scripting API.
The Global Definitions can be accessed as Project.GlobalDataElements object. This object works much like a simplified schematic so elements and equations can be added in the same way you'd add them to a schematic. We can add a substrate object in the same way we'd add one to a schematic with the Add() method specifying the MSUB name and the location to place the substrate element.
Once we have added the substrate definition to the global definitions we can create a schematic and add some elements to reference it.
This creates a schematic named "MySchematic" and then adds a MLIN element with input and output ports so it can be simulated. By default the MLIN element will reference a substrate named SUB1 which happens to be the default name given to the MSUB substrate. Since we added the substrate to the global definitions then all microstrip elements in all our schematics will use this substrate by default. So the entire example looks like the following:
And the results of running this program looks like below:
So whenever you want to define a data element or equation to be used by all schematics place that element in the Project.GlobalDataElements and then it will be available to all elements from all schematics in the project.