create_component_from_spicemodel#
- NexximComponents.create_component_from_spicemodel(model_path, model_name=None, create_component=True, location=None, symbol_path='Nexxim Circuit Elements\\Nexxim_symbols:', symbol_name='')[source]#
Create and place a new component based on a spice .lib file.
- Parameters:
- model_path
str
Path to .lib file.
- model_name
str
,optional
Model name to import. If None the first subckt in the lib file will be placed.
- create_componentbool,
optional
If set to
True
, create a spice model component. Otherwise, only import the spice model.- location
list
,optional
Position in the schematic of the new component.
- symbol_path
str
,optional
Path to the symbol library. Default value is
"Nexxim Circuit Elements\Nexxim_symbols:"
.- symbol_name
str
,optional
Symbol name to replace the spice model with. Default value is an empty string which means the default symbol for spice is used.
- model_path
- Returns:
pyaedt.modeler.cad.object3dcircuit.CircuitComponent
Circuit Component Object.
Examples
>>> from pyaedt import Circuit >>> cir = Circuit(specified_version="2023.2") >>> model = os.path.join("Your path", "test.lib") >>> cir.modeler.schematic.create_component_from_spicemodel(model_path=model, >>> model_name="GRM1234", >>> symbol_name="nexx_cap") >>> cir.release_desktop(False, False)