AxisVM COM Client#

axisvm.com.client.start_AxisVM(*args, join=False, visible=None, daemon=False, wrap=True, **kwargs) IAxisVMApplication[source]#

Returns an interface to a new, or an existing AxisVM application.

If the argument join is True, an attempt is made to connect to an already running instance. If there is a running instance but join is False, that instance gets destroyed and a new one will be created.

If the first argument is a valid path to an AxisVM model file, it gets opened.

Parameters:
  • join (boolean, Optional) –

    Controls what to do if there is an already running instance to connect to. Default is False.

    This is only available from X6r2. For versions prior to this, join=True has no effect and a new instance is created every time.

  • visible (boolean or None, Optional) –

    Sets the visibility of the AxisVM application, while a None

    value takes no effect. Default is None.

  • daemon (boolean, Optional) –

    Controls the behaviour of the COM interface. Default is False.

    Assuming that axapp is a COM interface to an AxisVM application, daemon=True is equivalent to

    >>> from axisvm.com.tlb import acEnableNoWarning, lbFalse, lbTrue
    >>> axapp.CloseOnLastReleased = lbTrue
    >>> axapp.AskCloseOnLastReleased = lbFalse
    >>> axapp.AskSaveOnLastReleased = lbFalse
    >>> axapp.ApplicationClose = acEnableNoWarning
    

  • wrap (boolean, Optional) – Wraps the returning object if True, returns the raw object otherwise. Default is True.

Returns:

A python wrapper around an IAxisVMApplication instance.

Return type:

axisvm.com.axapp.AxApp

Examples

>>> from axisvm.com.client import start_AxisVM
>>> axvm = start_AxisVM(visible=True, daemon=True)
axisvm.com.tlb.find_axisvm_tlb()#

Finds all registered AxisVM Type Libraries and returns a list of dictionaries including all important specs. If the function returns more than one item, consider unregistering the ones you don’t use.

Example

>>> from axisvm.com.tlb import find_axisvm_tlb
>>> axtlb = find_axisvm_tlb()
axisvm.com.tlb.wrap_axisvm_tlb(tlbid=None, major=None, minor=None)#

Returns the wrapped AxisVM type library as a python module. The library to wrap can be specified by Id, minor and major version numbers, but all three must be provided to have a complete specification. Otherwise, the function returns a python module for the first AxisVM type library found by the function find_axisvm_tlb().

Parameters:
  • tlbid (str, Optional) – Id of the type library to wrap. Defaut is None.

  • major (int, Optional) – Major version number of the type library to wrap. Defaut is None.

  • minor (int, Optional) – Minor version number of the type library to wrap. Defaut is None.

Example

>>> from axisvm.com.tlb import wrap_axisvm_tlb
>>> axtlb = wrap_axisvm_tlb("{0AA46C32-04EF-46E3-B0E4-D2DA28D0AB08}", 15, 1)

Note

All three specifiers must be provided, otherwise the function inherits the specifications from

Returns:

The wrapped AxisVM type library as a python module.

Return type:

module