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

User: "Israel Lopez"
Altair Community Member
Updated by Israel Lopez

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

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Mel"
    Altair Employee
    Updated by Mel

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