# Creating a Voltage Source

Create a voltage source by searching and navigating the documentation.

1. Search for voltagesource in the integrated help.
The results returned in response to the voltagesource query includes VoltageSource (object).
2. Double-click VoltageSource (object).
3. View the VoltageSource (object).
Note: Since there can be multiple voltage sources in the model, the voltage source object is part of a collection.
4. Click SourceCollection hyperlink to navigate to the SourceCollection description.
Note: A voltage source is configuration specific. It can be added to either a standard configuration or a characteristic modes configuration.

We want to add the voltage source to the default configuration (standard configuration).

1. Search for StandardConfiguration in the integrated help.
Double-click StandardConfiguration (object).
2. View the standard configuration object.
Note: Since there can be multiple standard configurations in a model, the standard configuration object is part of a collection.
3. Click the SolutionConfigurationCollection hyperlink to navigate to the SolutionConfigurationCollection description.
Note: The application project contains the StandardConfiguration.
The prepending syntax is as follows.
Project.SolutionConfigurations
4. Go back to SolutionConfigurationCollection in the integrated help.
Note: The Index list indicates you can reference the specific StandardConfiguration through indexing with the use of a number or a string.
5. Create a separate handle for the configuration.
this_config = my_project.SolutionConfigurations[1]
Tip: It is not necessary to create a separate handle for the StandardConfiguration, but is convenient for adding more configuration specific objects.
6. Add the voltage source using the following syntax.
my_voltage_source = thisConfig.Sources:AddVoltageSource(myPort)