当前位置:网站首页>ANSYS secondary development - MFC interface calls ADPL file
ANSYS secondary development - MFC interface calls ADPL file
2022-07-28 16:34:00 【CaeCoder】
List of articles
Development process
ANSYS-MFC The idea of secondary development is actually very simple , Usually MFC Mainly design interface , And then from MFC Read the parameters to be designed in the interface , Then, according to these set parameters, generate APDL Code , Then call ANSYS Batch processing function , So as to complete the specific program solution . Of course, after the solution , Can also be ANSYS The calculation results are displayed in the interface , So as to complete the finite element parametric model calculation software for a specific model . The specific process is shown in the figure below .

Developing code
The most commonly used controls for the functions of interface design are nothing more than buttons 、 The text box 、 The drop-down list 、 Picture display and other functions , Complete the trigger function of data and function , No introduction here .
Then according to the content of parameter settings , Generate apdl Language , And store it in a text document , for example “file.dat”
Open in batch ANSYS.
// Calculate button
void ModelSim::OnBnClickedButton10()
{
ModelList.DeleteAllItems();
DeleteTempFile();// Delete result
CString WorkOut = WorkDir +_T("\\Model.out");
CString path_2 = AnsysDir + _T(" -b -p ane3fl -dir ")+ WorkDir +_T(" -i ") + WorkPath + _T(" -o ") + WorkOut;
string path(CT2A(path_2.GetString()));
WinExec(path.data(),SW_MINIMIZE);// Start
}
among ,
- AnsysDir by Ansys directory , for example C:\Program Files\ANSYS Inc\v180\ansys\bin\winx64\ANSYS180.exe
- WorkDir by Ansys Working directory of , namely ansys Directory of simulation project , for example C:\Users\15321\Desktop\test
- WorkPath by file.dat directory , for example C:\Users\15321\Desktop\test\file.dat
- WorkOut by file.out directory , for example C:\Users\15321\Desktop\test\file.out
Reprinted from : https://www.cnblogs.com/gaozihan/p/10844007.html
Original author : Having both ability and political integrity
Date of publication : 2019-05-10
Scan the QR code below to follow my wechat official account - CAE Second development of software Lab, Read more about !

边栏推荐
- Notes on October 22, 2021
- “蔚来杯“2022牛客暑期多校训练营3 H.Hacker SAM+线段树/DP/分治(不带修查区间最大子段和)
- "Weilai Cup" 2022 Niuke summer multi school training camp 3 h.hacker sam+ segment tree /dp/ divide and conquer (without the largest sub segment and of the inspection interval)
- LeetCode每日一练 —— 剑指Offer 56 数组中数字出现的次数
- 关于web对接针式打印机问题,Lodop使用
- 头条文章_signature
- 排序5-计数排序
- mysql 查看事件状态语句和修改办法
- 8051 series MCU firmware upgrade IAP
- Multiple commands produce ‘.../xxx.app/Assets.car‘问题
猜你喜欢

LeetCode-学会复杂带随机指针链表的题(详解)

1. Simple command line connection to database

Two of C language programming!! Role of

解决电脑恶意广告弹窗的思路

mysql 查看事件状态语句和修改办法

Huada chip hc32f4a0 realizes RS485 communication DMA transceiver

Practical development tutorial of software problem repair tracking system (Part 1)

About standard IO buffers

IT远程运维是什么意思?远程运维软件哪个好?

Sort 2 bubble sort and quick sort (recursive and non recursive explanation)
随机推荐
Introduction and implementation of queue (detailed explanation)
curl无输出返回空白或者null问题解决
Roson的Qt之旅#101 Qt Quick中的模型和视图
flashfxp 530 User cannot log in. ftp
Reentrant and non reentrant
HyperMesh自动保存(增强版)插件使用说明
排序4-堆排序与海量TopK问题
laravel
Why do most people who learn programming go to Shenzhen and Beijing?
LeetCode每日一练 —— 剑指Offer 56 数组中数字出现的次数
PHP计算坐标距离
Sort 4-heap sort and massive TOPK problem
PHP图片合成技术
LeetCode-学会复杂带随机指针链表的题(详解)
QT QString详解
ANSA二次开发 - 界面开发工具介绍
LeetCode-学会对无序链表进行插入排序(详解)
nowcode-学会删除链表中重复元素两题(详解)
Solve the width overflow of rich text pictures such as uniapp
el-input限制只能输入规定的数