This section describes limitations.
Limitation 1: Complexity
The most visible limitation is a direct drawback of the power brought
by this new technology: you must now understand what a programming
language is, dealing with issues such as compilation, release/debug
modes, using a complex IDE with debugging windows and debugging concepts
etc.
As for the language itself, VB.NET is close enough to VBA, avoiding the
complexities of C#. Yet, as of January 2015, there is no available tool
for an automated migration of VBA projects to VSTA projects.
Limitation 2: Macro naming
In VSTA, the concept of Macro corresponds to C# or VB.NET methods, whereas
in VBA it corresponded to modules. To separate actual macros to be listed
in the Macros GUI from helper methods or utility methods, a naming rule
has been introduced: a macro name must start with "Macro".
Similarly, a macro is basically a sub in VB.NET or a method in C#. Thus,
some reserved characters cannot be used (for example, dashes).
Note:
The debug entry point CATMain is not listed in the Macros GUI, but is called when debugging using Visual Studio.
Limitation 3: Restart CATIA after VSTA registration
You must restart CATIA
after registering VSTA otherwise the opening of macro libraries may fail.
Limitation 4: VSTA cannot be executed from a network share
As with all .NET applications, VSTA assemblies cannot load from a network
share unless they are signed by the manufacturer and a specific .NET code
execution policy has been set.
For the moment, you will get the error 1711 if assembly loading
has failed:
Cannot start VSTA.
CATVSTAIntegration library cannot load.
Make sure that the VSTA runtime is propely installed and CATVSTAIntegration.dll is not loaded from a network share.
To bypass this, you can copy:
CATVSTAIntegration.dll
to a
local folder on your computer, and start CATIA again with the concatenated
full path. This means that you have to ask your administrator to modify
the CATInstallPath variable using the environment editor.
For example, if the variable value was:
\\networkshare\CATIAInstall
where:
CATIAInstall
is the path where CATIA is installed.
the administrator can modify it on your computer to:
C:\temp;\\networkshare\CATIAInstall
This supposes that you have copied CATVSTAIntegration.dll from:
\\networkshare\CATIAInstall\yourOS\code\bin
into:
C:\temp\yourOS\code\bin
where:
yourOS
is win_b64.