#1 2014-11-26 13:24:43

ana_cedillo
Member
Registered: 2014-11-26
Posts: 2

Access air density parameter

I am working on a simple script to extract to Excel the results for a Wind Farm in WAsP 11.
I am trying to access the air density value for the Project, but I can’t find the Parameter ID or index for the air density.
Is there a parameter dictionary I could look up?

Offline

#2 2014-11-26 14:54:51

Ray
WAsP team
Registered: 2009-05-13
Posts: 19

Re: Access air density parameter

Hi there,


there is indeed a parameter dictionary, here is some code which will list all the parameters of the project:


Set Configuration = Project.AsIRveaConfigurable.Configuration
Set Rv68ObjectFactory = CreateObject("Rvea0068.ObjectFactory")
Set ParameterDictionary = Rv68ObjectFactory.CreateParameterDictionary
    
' Project level parameters
Set Configuration = Project.AsIRveaConfigurable.Configuration

EditReport = "Project parameters shown below (ID - Description - Value)" & vbcrlf
EditReport = EditReport & "------------------" & vbcrlf & vbcrlf

For ParameterIndex = 1 To Configuration.NumberOfParameters
	Set Parameter = Configuration.ParameterByIndex(ParameterIndex)
	Description = ParameterDictionary.Description(Parameter.ID, "unknown")
	EditReport = EditReport & Parameter.ID & " - " & Description & " - " & Parameter.Value & vbCrLf
Next
Msgbox EditReport

You can access individual parameters using the parameter ID and change it's value:

' Change the standard height #1 parameter value
Set Parameter = Configuration.ParameterByID("STDH1")
Parameter.Value = 17

The parameter ID for air density is ROHFORPD so you can access it with:

Set Parameter = Configuration.ParameterByID("ROHFORPD")

Hope that helps.

Cheers,
Ray

Offline

#3 2014-11-26 15:44:37

ana_cedillo
Member
Registered: 2014-11-26
Posts: 2

Re: Access air density parameter

Thank you for the info.
It worked!

Offline

Board footer

Powered by FluxBB

[ Generated in 0.010 seconds, 10 queries executed - Memory usage: 518.15 KiB (Peak: 520.24 KiB) ]