Skip to main content

A mendix extension library implement mcp server.

Project description

def PostMessage(name, msg):
    print(msg)

# 导入
from mxpy.context import activeDocument

# 定义回调函数
def callback(event):
    PostMessage("python:exe", event)

# 读取
content = activeDocument.content

# 写入测试
activeDocument.content = "旧内容"
PostMessage("python:exe", activeDocument.content)

# 监听变更测试
activeDocument.content = "监听前的内容"
activeDocument.add_listener(callback)  # 添加监听器
activeDocument.content = "监听后的内容"  # 这里会触发 callback
activeDocument.remove_listener(callback)  # 移除监听器
activeDocument.content = "移除监听后的内容"  # 这里不会触发 callback

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymx-1.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymx-1.1.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file pymx-1.1.0.tar.gz.

File metadata

  • Download URL: pymx-1.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pymx-1.1.0.tar.gz
Algorithm Hash digest
SHA256 93b35dc47a3929fbf952e607729d6b9bb6f2dbb2d66bb91ad19cca561675117b
MD5 95d3da39e54f76887f60cd130db9622d
BLAKE2b-256 b84e610da7ead6bd8a0ef782719fb2c3e008d785f7397816d8bb9e39c03107d0

See more details on using hashes here.

File details

Details for the file pymx-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymx-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pymx-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 510d96187b8f350282b281eb8407061503b5796eec454019ac2e02d58f1f13ee
MD5 a7494d4c606fb89bf14ed870111149d8
BLAKE2b-256 84d6a0f5b484b858d3d3acd3f01fec9a0bde86d2c44c0a9552608ce4720adfc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page