Subject: Branch.River does not seem to be working Posted: 3/5/2018 Viewed: 229 times
I'm trying to access the River name where the reservoirs or reaches are located on.
I tried this simple script but it gives me the error below
FOR EACH Br IN WEAP.Branches
if BR.TypeName="Reservoir" THEN
Error: Could not convert variant of type (Dispatch) into (OleStr)
Could you please help me to get the call Branch.River to work?
Mr. Jack Sieber
Subject: Re: Branch.River does not seem to be working Posted: 4/16/2018 Viewed: 224 times
River is not a valid property of the Branch API object.
Here is a simple script that will list the river name for each reservoir:
FOR EACH River in WEAP.Branch("Supply and Resources\River").Children
FOR EACH RiverType in River.Children
IF RiverType.Name = "Reservoirs" THEN
FOR EACH Child in RiverType.Children
Print Child.Name & " is on River " & River.Name
Eng. Adel Abdallah
Subject: Re: Branch.River does not seem to be working Posted: 4/16/2018 Viewed: 218 times
Great! thanks Jack