Page 1 of 1

Understanding VE Documentation

Posted: Wed Apr 25, 2018 7:23 pm
by NebK22
Hi all,

Beginner python user here. I've gone through the User Guide, but I still have a lot of questions. At the moment, I'm playing with the list of available methods within the iesve class, but am struggling to even call certain methods properly.

For instance, on page 19, 6.1.1, it goes over AirExchange. I was trying to call the method get() below:

Code: Select all

import iesve 

#6.1.1 Air Exchange page 19
proj = iesve
airexchange = proj.AirExchange
print(airexchange.get())

But this gives me an ArgumentError :

Code: Select all

Traceback (most recent call last):
  File "C:\Users\BXK\Desktop\Local Projects\BXK VE Scripts\Test\hello.py", line 7, in <module>
    proj.get()
Boost.Python.ArgumentError: Python argument types in
    AirExchange.get()
did not match C++ signature:
    get(class AirExchange {lvalue})
  >>> Runtime: 0.00 seconds
Based on the userguide, the get() method doesn't take in any arguments. Am I interpreting the User Guide wrong? Why am I getting this error and how can I call the methods listed in the VE documentation?

Big thanks!

Re: Understanding VE Documentation

Posted: Fri Apr 27, 2018 9:14 am
by Rhind
Hi,

You are using 'get()' correctly but there is an issue with the creation of your 'AirExchange' object.

Here's a simple script that will do what you want:

Code: Select all

import iesve 

# we will get the list of defined air exchanges
# in order to do this, we start with the currently loaded VE project
project = iesve.VEProject.get_current_project()

# get list of known air exchange objects from the project:
air_exchanges = project.air_exchanges()

# Print information about individual air exchanges:
for air_exchange in air_exchanges:
    # query the air exchange object for its data
    air_exchange_data = air_exchange.get()
    
    # print the available data to output
    print(air_exchange_data)
 
I recommend taking a look through the samples that are included with the VE. They are a great way of getting started.

Hope that helps.