Python API

I’m trying to use the Python API but I’m having some trouble finding the module libraries. Where can I find them? Such as vcApplication, vcCommand, vcScript, …

I’m using a trial version of the Visual Components 4.0 Premium.

Thank you,
RSilva

Do you mean the source code, documentation or how to import them in general?

A component script would import vcScript to get a handle for the application, component, simulation, commands, etc.

An application script is usually two files, a command file and its config file. A command file would import vcCommand to define a command and its state. A config file (init) would import vcApplication to find and register the command, add the command to GUI, and localize the GUI. See “Create a Python Command” in Python API reference guide of Help File for more info.

vcApplication, vcCommand, vcScript,… are built-in modules that are embedded in the core application. So you can’t find any module files that can be edited.

Hi everyone,
Can we install vcApplication (vcCommand, vcScript and everything else) with a simple “pip install vcApplication” for example?
THANKS

Hi @TCHOUNKE

The vcApplication instance is tightly coupled with the Python runtime embedded in Visual Components, so it is practically not possible.

Also, the application is not publicly available, thus not provided via pip.

Can I add them to “path” so the external editor will not display the import error?