Jump to content

Access air density parameter


Recommended Posts

Posted
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?
Posted
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...