iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 24771|回复: 3
打印 上一主题 下一主题

UG下的一段程序,请指正

[复制链接]
跳转到指定楼层
楼主
发表于 2003-7-9 08:35:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
如下是在UG下,用 UF_DRF_create_note在图纸的某一位置写2行文字的程序,运行时老说内存错误,请高手指正。
  
#include <stdio.h>
#include <uf.h>
#include <uf_ui.h>
#include <uf_exit.h>
#include <uf_drf.h>
#include <uf_drf_types.h>
  
extern DllExport void ufusr( char *parm, int *returnCode, int rlen )
{
    /* Initialize the API environment */
    int errorCode = UF_initialize();
  
    if ( 0 == errorCode )
    {
        /* TODO: Add your application code here */
                int num_lines_text;
  char*  text_string[2];
  double origin_3d[3];
  int orientation;
                tag_t* note_tag;  
  
                num_lines_text=2;
  text_string[0]="adsadsadsafdsa";
                text_string[1]="bbb";
  origin_3d[0]=100.0;
  origin_3d[0]=200.0;  
  origin_3d[0]=0.0;
  orientation=0;
                 note_tag=NULL;
  
  UF_DRF_create_note(num_lines_text,text_string,origin_3d,orientation,note_tag);
  
  /* Terminate the API environment */
        errorCode = UF_terminate();
    }
  
    /* Print out any error messages */
   &nbsprintErrorMessage( errorCode );
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
沙发
发表于 2003-7-9 09:03:11 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
板凳
 楼主| 发表于 2003-7-9 22:52:17 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
地板
发表于 2003-7-15 11:26:00 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手板模型制作,在线3D打印服务

QQ|小黑屋|手机版|开思工具箱 CAD工具箱_CAM工具箱  

GMT+8, 2024-5-7 08:00 , Processed in 0.015227 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表