Toad World® Forums

Scripting in VB


#1

Hi,

I want to write a script that will add additional information to entities.
This information is currently held in Oracle Designer.

My plan is;

  1. add the attributes to the objects (I followed the customisation example)
  2. extract data from Designer into a file
  3. create a script I can run to open the file and update the objects.

To access the file I need to use VB script.
Using your examples I have JS code to loop round and update entities.

How do I either;

  1. call VB from JS?
    or
  2. Loop round and update entities in VB?

Examples would be appreciated.

TIA
Malcolm


#2

Hello Malcolm,

I’m bringing bad news. We found a bug in our support for VB script. Unfortunately, it does not work properly. We need to fix it. CR # 44 092.
We’re sorry.

Thanks for your patience.

Vladka + TDM Team


#3

Oh dear!

Can you give me some idea of the development schedule and when we might expect fixes for various issue?

Thanks
Malcolm


#4

Next Beta version will be released in February.
Commercial version later in Q1. The new official version will bring many new features and enhancements and more than fifty resolved issues (since v. 3.0.13.175).
The issues are being fixed continuously and implemented in Beta versions. So, the next Beta will bring some fixes as well.

If you need to know at what stage particular issue is, just tell me the CR number. I’ll let you know - if it’s fixed or not, in which release it will be implemented, issue priority etc.

Concerning the bug in VB, the problem has been identified and is waiting for fix, then has to be tested, priority is low, unfortunately. At the moment our developers are dealing with tasks that have higher priority.

As soon as I have any news on this issue, I’ll let you know.

Thanks for understanding it.

Vladka


#5

Hi Vladka,

Thanks for the info.

Will new versions preserve changes to metamodel, forms, scripts that we have made?

Thanks
Malcolm


#6

Hello Malcolm,

Files that you can modify (user files) are stored by default in your Documents and Settings directory.
Possible paths for full version:
C:\Documents and Settings\user name\My Documents\Toad Data Modeler,
C:\Documents and Settings\user name\Application Data\Quest Software\Toad Data Modeler.

Possible paths for Beta:
C:\Documents and Settings\user name\My Documents\Toad Data Modeler Beta
C:\Documents and Settings\user name\Application Data\Quest Software\Toad Data Modeler Beta

These files are preserved during the update.

  • metamodels - stored at:
    C:\Documents and Settings\user name\My Documents\Toad Data Modeler Beta\Packages{DCB5CB9B-CF65-4350-86B5-285D246FC5AC}\Metamodels
  • forms - stored at TDM.txe or add-on or My Package (depends on what modifications you mean) in the Configs or Packages directories.

Other information:

  • metamodels, scripts - Each system package has its own metamodel. Generally, there are three types of packages in TDM:
  • system packages (are updated with each new release)
  • add-on packages (user packages, remain preserved during update)
  • My Package (user package, remains preserved during update).

You ask if the changes you made will be preserved. - Well, it depends on what changes you made and where. System packages will be updated in any case. The new version brings significant enhancements and the system packages and scripts have been changed a lot. It might happen that your user script will be preserved, however possibly will not work as you expect. However, let’s do not precede.
In any case, detailed install and update information etc. will be published (in the Beta Release Notes doc as usually, and in the Installation Guide for commercial version).

Regards,

Vladka


#7

Hello again,

Just an additional note refering to my previous reply - for all who like to work with scripts and packages to customize the product.

Let me inform you that significant changes are being made in system scripts and packages for next version 3.1. OTPs (Object Types and Properties) will be implemented to TDM3. This will bring changes in packages and scripts for reverse engineering (object oriented RE), model update, script and report generation, verification etc. Almost everything.
The new version 3.1 will come out at the end of Q1.

So, please wait with the customization till version 3.1 is released.
Also, some documentation, tutorials and blog will be available in the community.

Thank you.

Note: Malcolm, please check out the Private Messages section. Thanks.

Vladka + TDM team


#8

Back to your first question:

I don’t know if this suits your purpose… This code that wastaken from the Microsoft MSDN can be run in TDM and calls an externalVB script:

*function Main()
{
var WshShell = new ActiveXObject(“WScript.Shell”);
var oExec = WshShell.Exec(“wscript C:\Temp\OpenFolder.vbs”);

’ while (oExec.Status == 0) WScript.Sleep(100);’
}*

Notice however that the WScript object is not available in TDM so you have only poor means for scripting synchronization…

moakes wrote:


How do I either;

  1. call VB from JS?