It looks like you're new here. If you want to get involved, click one of these buttons!
tech = pya.NetTracerConnectivity()
tech.connection("1/0", "5/0")
....
tracer = pya.NetTracer()
....
To use the net trace function in the GUI, I have already saved the connectivity information in the tech file.
How can I get this information in a script and use it?
Comments
Hi @MooGyuBae,
The key is the
Technology
object. If you have loaded the technology, use "technology_by_name", like thisyou can also construct a Technology object from a XML file:
The technology information is organized into "components" (use "component_names" to get a list of them). The one you're looking for is "connectivity":
(returns None if the technology does not have connectivity information). This will give you
NetTracerTechnologyComponent
object and this is the key to getting theNetTracerConnectivity
object. As there can be multiple stacks (a feature introduced in version 0.28), you have to iterate the connectivity objects:Pick the one with the name you are looking for and "conn" will be the object you need for the net tracer.
Note that pre-0.28, the technology component itself was the
NetTracerConnectivity
object, but that meant there was only one stack per technology.Matthias