[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EnergyPlus_Support] Re: Running simulation using VB



I guess there's a couple options.

1) Modify your macro to run the EnergyPlus.exe directly and avoid the batch file.  This would require setting up the input file and renaming it to in.idf, as well as copying your weather file to in.epw.  Then you would post-process as necessary.

2) When you use the shell command, you have to be careful with your quotes if you are passing paths with directories and spaces.  I have run batch files and such from VBA in the past, and I remember having some issues with the shell function, but that stuff's long gone with a reformat.  If your issue is directly related to the shell function, you may have better luck hitting a vba forum.  If you'd like to post a brief snip of your vba routine (only the relevant variables and calls), I'll have a look at it.

Edwin

On Tue, Mar 17, 2009 at 5:51 PM, gadolio2002 <gadolio2002@xxxxxxxxx> wrote:

Thanks for the response Edwin. I've already tried to follow the documentation, but it seems that when I execute the command to run the simulation using the Shell function, it doesn't pass the input file name to E+ batch file (the simulation initiates but stops soon sfter because no input file was specified)?

Thanks Again.



--- In EnergyPlus_Support@xxxxxxxxxxxxxxx, Edwin Lee <leeed2001@...> wrote:
>
> To run E+ from a VBA macro, you'll probably just be starting an executable
> through the shell. This can be found all over the place with google:
> http://www.computing.net/answers/programming/vba-shell-function/2677.html
>
> for one.
>
> There is information in the AuxillaryPrograms.pdf documentation that comes
> with E+ about how to run E+ directly, without a front-end. Just search on
> 'Running EnergyPlus by Hand'.
>
> Good luck...
> Edwin
>
> On Tue, Mar 17, 2009 at 5:03 PM, gadolio2002 <gadolio2002@...> wrote:
>
> > Hi All,
> >
> > Can someone guide me through how to run an EnergyPlus Simulation using
> > Microsoft Visual Basic Macro (from Excel)?
> >
> > Thanks
> >
> >
> >
>




__._,_.___


The primary EnergyPlus web site is found at:
http://www.energyplus.gov

The group web site is:
http://groups.yahoo.com/group/EnergyPlus_Support/

Attachments are not allowed -- please post any files to the appropriate folder in the Files area of the Support Web Site.

EnergyPlus Documentation is searchable.  Open EPlusMainMenu.pdf under the Documentation link and press the "search" button.




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___