In xPCB scripting, we can make use of scripting.globals to communicate with Excel, and obtains Excel data. I am unable to find similar command in Viewdraw. How do I execute global command to obtain data from Excel using vbs? Thanks a lot
Hmm using GetObject as shown here:
How to use GetObject in VBScript - Stack Overflow
If this is not what you mean then elaborate a little more as to what you need.
Set objExcel = CreateObject("Excel.Application")
Thank you. Let me give it a try
To connect to the first opened Excel on your desktop use the GetObject. (If you have 5 Excel's open it ill connect to the first one)
If you want to create a new excel and connect to that use the CreateObject.
We have tested the speed of several ways of data transfering from excel to ViewDraw. The Direct Communication between them is the slowest. Currently, we have to create a txt file as a cash (buffer). It is much faster than that Direct Communication. But, we still want to know if mentor has the method to transfer data to the viewdraw script, just like scripting.globals for Expedition Script.
If VBScript is slow to transfer data between Excel & ViewDraw then have you tried Perl? I ended up writing a script in Perl to speed up execution time (made substantial difference for me).
Depends of what you want to do.
In our case , we prefer Excel because we can do manually/visually simple operation that Mentor tool is not able to do as sort, copy/paste data, intelligently add swap code (with number instead) like lower-end software did
I never tried Perl yet but this is something that interest me when we will need to have data intensive ....
Sometime I notice that what is slow is not scripting but the tool itself ..like open a cell, or open symbol ...it take looooooong time before you can get any data out of it ....
You're right, open a cell or PCB, open symbol or SCH, Integration..., cost a long time. But, in my test, I just let my code to write data into more than 6000 cells in excel by different ways. The performances are quite different.
Thanks for your suggestion. As described in Mentor's Tutorial, Perl is somewhat cryptic for non-programmers like me:) And, I can easily get help from mentor's tutorials or excel's vba environment. I'm not sure the performacne difference from vbs and perl, but considering the difficulty and small performance improvement, VBS may be my best choice.
Retrieving data ...