基于Python的Adams二次开发——通过Command Server实现Adams和Python的通讯

本文详细介绍了如何使用Adams View的Command Server进行模型操作和数据查询,包括通过Python发送命令和查询的具体示例,以及如何处理多条指令和二进制模式。

# 参考file:///D:/ProgramFiles/MSC.Software/Adams/2017_2/help/wwhelp/wwhimpl/common/html/wwhelp.htm#href=adams_view/command_server.html&single=true

# 参考https://blog.youkuaiyun.com/weixin_33698043/article/details/94562370

'''

先在Adams中打开Command_Server(tool→Command Navigator→Command_Server)。

需要注意的是,指令如果没有发送成功,会造成通讯崩溃。

Command Server - Language

    1. Commands: 

    command strings beginning with the string "cmd" are assumed to be valid Adams View  

    Example:  "cmd file command read file='load_model.cmd'"

    Returns: “cmd: 0” (on success)

            “cmd: 1” (error detected in View command)

            

    2. Queries: 

    command strings beginning with the string "query" are assumed to be valid Adams View Expressions; 

    the Command&nb

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值