NX二次开发-UFUN获取圆柱的参数UF_MODL_ask_cylinder_parms
NX11+VS2013
#include <uf.h>
#include <uf_modl.h>
#include <uf_ui.h>
UF_initialize();
//创建圆柱
UF_FEATURE_SIGN Sign = UF_NULLSIGN;
double Origin[] = { 0.0, 0.0, 0.0 };
char *Height1 = "";
char *Diam1 = "";
double Direction[] = { 0.0, 0.0, 1.0 };
tag_t CylTag = NULL_TAG;
UF_MODL_create_cyl1(Sign, Origin, Height1, Diam1, Direction, &CylTag);
//获取圆柱的参数
char *Diameter;//输出直径
char *Height;//输出高度
UF_MODL_ask_cylinder_parms(CylTag, , &Diameter, &Height);
//打印
//默认输出格式为表达式等号左右值
UF_UI_open_listing_window();
UF_UI_write_listing_window(Diameter);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(Height);
//只输出表达式等号右值
//提取左右值
string D = Diameter;
string DStrleft = (D.substr(, D.find("=")));//提取左值
string DStrright = (D.substr(D.find("=") + , D.find(" ")));//提取右值
string H = Height;
string HStrleft = (H.substr(, H.find("=")));//提取左值
string HStrright = (H.substr(H.find("=") + , H.find(" ")));//提取右值
char DBufLeft[], DBufRight[];//左值,右值
char HBufLeft[], HBufRight[];//左值,右值
//将string类型转换为字符数组
strcpy(DBufLeft, DStrleft.c_str());
strcpy(DBufRight, DStrright.c_str());
strcpy(HBufLeft, HStrleft.c_str());
strcpy(HBufRight, HStrright.c_str());
//打印右值
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(DBufRight);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(HBufRight);
//释放内存
UF_free(Diameter);
UF_free(Height);
UF_terminate();

NX二次开发-UFUN获取圆柱的参数UF_MODL_ask_cylinder_parms的更多相关文章
- NX二次开发-UFUN获取球的参数UF_MODL_ask_sphere_parms
NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...
- NX二次开发-UFUN获取块的参数UF_MODL_ask_block_parms
NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...
- NX二次开发-UFUN获取NX系统默认导出CGM的选项设置UF_CGM_ask_default_export_options
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN获取当前导出CGM选项设置UF_CGM_ask_session_export_options
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN获取环境变量路径,将环境变量转换为字符串,字符串拼接UF_translate_variable
NX9+VS2012 #include <uf.h> UF_initialize(); //UFUN获取环境变量路径 //将环境变量转换为字符串 char* GetName = NULL; ...
- NX二次开发-UFUN获取系统相关信息UF_ask_system_info
NX9+VS2012 #include <uf.h> UF_initialize(); UF_system_info_t Info; UF_ask_system_info(&Inf ...
- NX二次开发-UFUN获取当前所在的模块UF_ask_application_module
NX9+VS2012 #include <uf.h> #include <NXOpen/UI.hxx> #include <NXOpen/MenuBar_MenuBarM ...
- NX二次开发-UFUN创建圆柱UF_MODL_create_cyl1
NX9+VS2012 #include <uf.h> #include <uf_modl.h> #include <uf_obj.h> #include <u ...
- NX二次开发-UFUN获取显示在NX交互界面的对象UF_OBJ_is_displayable
NX9+VS2012 #include <uf.h> #include <uf_disp.h> #include <uf_obj.h> #include <u ...
随机推荐
- laravel多字段模糊匹配
use App\Models\Resume; $resume = Resume::query(); $content = $request->input('content'); $resume ...
- nodejs的桌面应用(electron)
最近发现nodejs可以做桌面应用,主要是之前的同事在搞,我也要稍微研究下不能落后啊,基于nodejs的桌面应用,常用的就是nw.js和electron,nw出的比较早,资料比较多,bug也很多,它的 ...
- 【LeetCode 26】删除排序数组中的重复项
题目链接 [题解] 沙比提 [代码] class Solution { public: int removeDuplicates(vector<int>& nums) { if ( ...
- java——文件
- Shell4
ssh 192.168.4.5>提示continue,连接过的主机不会提示>连接过的主机 文件存放位置:/root/.ssh/known_hosts ################### ...
- list 链表
#include <list> #include <iostream> using std::list; /* 双向环状链表 //每一个结点 一个数据域 一个前驱指针 一个后驱 ...
- badboy设置参数化
概述 1.将录制的检查点设置参数化 2.然后回放看结果 ps.设置检查点教程请看上一篇badboy教程 第一:添加变量 第二:将循环次数.请求参数.检查点设置参数化 第三:设置完毕后,点击回放按钮进行 ...
- 剑指offer——二进制中1的个数(c++)
题目描述实现一个函数,输入一个整数,输出该数二进制表示中1的个数.例如,把9表示成二进制是1001,则输出为2 常规解法首先把n和1做位运算,判断n的最低位是不是1,然后把1左移一位得到2,再把n和2 ...
- VMware Network Adapter VMnet1/8详解
转自:https://www.cnblogs.com/systemnet123/articles/2640883.html VMWare提供了三种工作模式,它们是bridged(桥接模式).NAT(网 ...
- POJ 3130 How I Mathematician Wonder What You Are! (半平面交)
题目链接:POJ 3130 Problem Description After counting so many stars in the sky in his childhood, Isaac, n ...