The latest version (v5.6) says that it is COM enabled. I have been trying to access Ecotect from a VBscript without any success.
Does anyone know how to create an instance of Ecotect in VB?
I tried using
Eco = CreateObject('Ecotect.comauto')
Eco = CreateObject('Ecotect.application')
etc etc
Can any one direct me to the correct command for the same.
Help!


Using VisualBasic with ECOTECT...
Hi Prasun,
Try this person - I believe he has been able to successfully call ECOTECT using VB scripting:
http://squ1.com/user/2652
Regards,
sid thoo architect
VBScript and Eco
Hi Prasun,
I use this snippet to call Eco:
-----------------------------------
Set WshShell = CreateObject("WScript.Shell")
'start Ecotect
Set oExec = WshShell.Exec("C:\Program Files\Square One\Ecotect.exe")
' wait until Ecotect has started
While WshShell.AppActivate("Ecotect v5") = False
WshShell.Popup "Ecotect starting up: please, wait a moment!", 2, , 64
WScript.Sleep 1000
Wend
------------------------------------
Regards,
Dirk
Dear Dirk, I succeeded in
Dear Dirk,
I succeeded in connecting Rhinoceros with vbScript to Ecotect, thanks to your kind contribution! Many thanks!!
However, I still would like to know how to give Ecotect specific orders with using vbScript. I am intending to make some scripts for generating and evaluating architectural forms with linking two softwares. Even though I have had some experiences with RhinoScript based on vbScript, I haven't link this with differnt softwares other than Excel.
If you tell me even one example like the above one, it is definitely helpful for me. Please help me !
Best regards,
Maron
VBSCript and Ecotect
Dear Maron,
I have been working on this problem for quite some time now. Unlike Rhino I cannot "control" Ecotect directly through VBScript. However I can call the the scriptmanager from Ecotect and run any script written in lua (my ecoscript.scr file). This way, I suppose you can do analysis on any (?) model you imported from Rhino. Take a look at this snippet.
-------------------
'open Ecoscript in scriptmanager
Set oExec = WshShell.Exec("C:\Program Files\Square One\ScriptManager.exe Ecoscript.scr")
'wait until Scriptmanager has started
While WshShell.AppActivate("ECOTECT: Scripting") = False
WScript.Sleep 1000
Wend
'bring scriptmanager to front and run ecoscript
WshShell.AppActivate ("ECOTECT: Scripting")
WshShell.SendKeys "{F9}"
------------------------------
Regards,
Dirk
ECOTECT and COM
Dear Dirk,
Thank you very much for your kind reply.
To be honest, after I posted my question, I have reached at the same result as yours, as I spent all(!) of last week to examine ECOTECT's capability to connect with other applications...
As You suggested, it seems like we cannot control directly ECOTECT from vbScript, while its help file says in some parts we can use COM objects... Does it mean another things rather than usual meaning?
Anyway, I think a next problem might be how we can use "excel" and "shell" of Lua-Ecotect's commands in order to link Ecotect with others. For example, it seems that we can use the below line, even though our help file has never referred to that...
excel("open", "yourFile.xls")
excel("save", "yourFile.xls")
excel("saveas", "yourFile.xls")
Although I really need to use something like "Sheets" command, I have not been able to find it out so far...
I think we need to accumulate these information into somewhere which the mannual does not explain about...
Anyway, Thanks a lot !
Maron