How to connect the terminals of two Networks using lua script?

Israel Lopez
Israel Lopez Altair Community Member
edited November 2021 in Community Q&A

We have the following script to add Networks to cadfeko:

app = cf.GetApplication()
project = app.Project

Code = {"10", "11"}
for idx = 1, #Code do
networks = project.SolutionConfigurations[1].Networks
networks:AddGeneralNetwork(cf.Enums.GeneralNetworkDataTypeEnum.SMatrix,2, "NetA_" .. Code[idx] .. ".s2p")
networks["GeneralNetwork1"].Label="NetA_" .. Code[idx]
networks:AddGeneralNetwork(cf.Enums.GeneralNetworkDataTypeEnum.SMatrix,2, "NetB_" .. Code[idx] .. ".s2p")
networks["GeneralNetwork1"].Label="NetB_" .. Code[idx]
properties = cf.Load.GetDefaultProperties()
properties.ImpedanceReal = "50"
properties.Label = "Load_"..Code[idx]
NWName = "NetA_" .. Code[idx]
properties.Terminal = project.SolutionConfigurations[1].Networks[NWName].Terminals[NWName..".Port2"]
Load_Code = project.SolutionConfigurations["StandardConfiguration1"].Loads:AddLoad(properties)
end

 

How could we link the 2 networks within that lua script?

Thanks

Tagged:

Answers

  • Mel
    Mel Altair Community Member
    edited November 2021

    It is unfortunately not yet available to do those connections with Lua.