launching Ecotect as an external application through VBA

''This will launch Ecotect (specify correct install directory)
Dim RetVal
RetVal = Shell("C:\Program Files (x86)\Autodesk\Ecotect 2009\ECOTECT.EXE", 1)

''___________________________________________________
''and this will only launch Ecotect, if it is not already running:
Set Service = GetObject("winmgmts:")

For Each Process In Service.InstancesOf("Win32_Process")
    If Process.Name = "Ecotect.exe" Then
        wscript.echo "Ecotect running"
        Stop
        wscript.Quit

    End If
Next
'wscript.echo "Ecotect not running"
Dim RetVal
RetVal = Shell("C:\Program Files (x86)\Autodesk\Ecotect 2009\ECOTECT.EXE", 1)
''___________________________________________________

I can’t remember where I found this, but I tested it for Ecotect, and it works fine. It will also work with other applications.

CATEco v0.1 connecting Catia & Ecotect via .net/DDE

CATEco v0.1 is a proof of concept connection between Catia V5r19 and Ecotect 2011.  CATEco uses vb.net and DDE (dynamic data exchange) to communicate between the two platforms.  The attached video shows Catia geometry being sent to Ecotect, analyzed for solar insolation, then returning the solar insolation value to a parameter in Catia.  Much thanks goes out to Jonatan Schumacher for getting us started and Nathan Miller’s http://theprovingground.wikidot.com/ecotect-dde and of course UTO’s Geco.

More development to come…


-Ben Howes & Matt Naugle

CATeco – get(“results.solar.incident”, hr) — working??

Some of us had problems getting different results in the EcotectLouverDemo, we all got the same results for each day, but trying this I got different results for each one and it seems to work.(double checked manually):

---STUDY---
-- Cycle through months:
for i = 1,4 do
-- Set date.
set("day", CalcRange[i])
day = get("model.dayoftheyear")
print(day)
for hr = 8, 17   do   --or FirstHour, LastHour
cmd("select.object", 0)
cmd("selection.update")
set("time", hr)
cmd("calc.solar","day", 2, 0, 1) --THIS THE DIFFERENCE--
SolarInc = get("results.solar.incident", hr)
print(SolarInc)
sheet1.Cells(10+i,hr).Value2 = SolarInc
sheet1.Cells(10,hr).Value2 = hr
end
--Enjoy--