Old Forum Archivist Posted November 27, 2009 Posted November 27, 2009 Hi,I'm trying to prepare a script for Wasp in which I need to know something about the wtg file used. Especially which performance table of the wtg that has been used. Any way to get this?Thanks, Hans Peter Jensen--------Hi, Here is some example script code which will probably help.Set Calculator = TurbineSite.AsICalculatingHierarchyMemberSet PowerCalculation = Calculator.CalculationByType(5)Set Associates = PowerCalculation.AssociatesSet Wtg = Associates.WindTurbineGeneratorAssuming that you have a reference to the turbine site, then you can retrieve the associated WTG like that. The '5' in the CalculationByType corresponds to the power production.Then you can get the index of the selected performance table, and the performance table itself.Set Ptable = Wtg.SelectedPerformanceTableIndex = Wtg.SelectedPerformanceTableIndex--------Thanks,Is there a way to actual set the performance table to be used by a turbine site group and then do the calculations? I often need to run through 5 different performance tables for a single site group and re-calculate AEP. Would that be possible programmatically?--------Yes, the SelectedPerformanceTableIndex property is not read-only, so you can use that to change the currently selected performance table.--------
HPJ Posted January 6, 2010 Posted January 6, 2010 Works perfectly, I can set the tables as I want. There's further complications though; I need to check (one at a time) each TurbineSite to see if there's a 'local' wtg attached. If not I'll need to attach 'locally' the wtg from the level above and at the same time keep the original for all the other sites in that group. Then do some calculations and then delete the 'local' copy before moving on to the next TurbineSite. Any chance of that happening? I hope it's clear what I'm trying to do. If not let me know :-)ThanksHP
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now