iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 24376|回复: 4
打印 上一主题 下一主题

请问下面错误如何解决???

[复制链接]
跳转到指定楼层
楼主
发表于 2003-4-3 11:09:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
/*----------------------------------------------------------------*\
  Pro/TOOLKIT includes
\*----------------------------------------------------------------*/
#include &ltroToolkit.h>
#include &ltroMdl.h>
#include &ltroFeature.h>
#include &ltroFeatType.h>
#include &ltroUtil.h>
#include &ltroAsmcomp.h>
#include "assembly.h"
#include "roSolid.h"
#include "test1.h"
/*----------------------------------------------------------------*\
  Application includes  
\*----------------------------------------------------------------*/
#include <TestError.h>
/*----------------------------------------------------------------*\
  Global definitions
\*----------------------------------------------------------------*/
#define FILENAME "assembly.lst"
  
typedef struct user_appdata
{
  FILE *fp;
  int   level;
} UserAppdata;
/*----------------------------------------------------------------*\
  Function prototypes  
\*----------------------------------------------------------------*/
int UserAsmCompVisit (void *dummy, int dummy2);
ProError UserAsmCompFilter (ProFeature *feature, ProAppData app_data);
ProError user_action (ProFeature *feature, ProError status,
   &nbsproAppData appdata);
/*================================================================*\
  Function to write out the members of the current assembly, and
  display the result in an information window.
\*================================================================*/
int UserAsmCompVisit (void *dummy, int dummy2)
{
 &nbsproMdl       asm;
  char         name[PRO_NAME_SIZE];
  char         type[PRO_TYPE_SIZE];
  wchar_t      wname[PRO_NAME_SIZE];
 &nbsproMdldata   mdldata;
  ProError     err;
  UserAppdata  appdata;
  FILE        *fp;
  
  ProMdlCurrentGet ([$asm)]
/*----------------------------------------------------------------*\
  Open the text file.
\*----------------------------------------------------------------*/
  strcpy (name,FILENAME);
  fp = fopen (name,"w");
  ProMdlDataGet (asm, [$mdldata)]
  ProWstringToString (name, mdldata.name);
  ProWstringToString (type, mdldata.type);
  fprintf (fp, "%s     %s\n",name,type);
  appdata.fp = fp;
  appdata.level = 1;
/*----------------------------------------------------------------*\
  List the assembly members.
\*----------------------------------------------------------------*/
  // ProSolidFeatVisit (asm, user_action, UserAsmCompFilter, [$appdata)]
/*----------------------------------------------------------------*\
  Close the file and display it.
\*----------------------------------------------------------------*/
  fclose (fp);
  ProStringToWstring (wname, FILENAME);
  ProInfoWindowDisplay (wname, NULL, NULL);
  return (PRO_TK_NO_ERROR);
}
/*================================================================*\
FUNCTION:  UserAsmCompFilter()
PURPOSE:   A filter used by ProSolidFeatVisit() to visit
           features that are assembly components
\*================================================================*/
ProError UserAsmCompFilter (
  ProFeature *feature,
  ProAppData app_data)
{
  ProError    status;
  ProFeattype ftype;
/*----------------------------------------------------------------*\
  Get the feature type
\*----------------------------------------------------------------*/
  status = ProFeatureTypeGet (feature, [$ftype)]
/*----------------------------------------------------------------*\
  If the feature is an assembly component,
     return NO ERROR,
  else
     return CONTINUE
\*----------------------------------------------------------------*/
  if (ftype == PRO_FEAT_COMPONENT)
      return (PRO_TK_NO_ERROR);
  return (PRO_TK_CONTINUE);
}
/*-----------------------------------------------------------------*\
  Write the information to a file.
\*-----------------------------------------------------------------*/
ProError user_action (
  ProFeature  *feature,
  ProError     status,
  ProAppData   appdata)
{
  FILE         *fp;
  int           l, level;
  ProError      err;
  ProMdl        mdl;
  char          name[PRO_NAME_SIZE];
  char          type[PRO_TYPE_SIZE];
  wchar_t       wname[PRO_NAME_SIZE];
  UserAppdata  *appd, appd1;
  ProMdldata    mdldata;
  
  appd = (UserAppdata *)appdata;
  fp = appd->fp;
  level = appd->level;
  ProAsmcompMdlGet (feature , [$mdl)]
  ProMdlDataGet (mdl, [$mdldata)]
  ProWstringToString (name,mdldata.name);
  ProWstringToString (type,mdldata.type);
  for (l = 0; l < level; l++)
       fprintf(fp,"    ");
  fprintf (fp,"%s      %s\n",name,type);
  if (strncmp (type,"ASM",3) == 0)
  {
      appd1.fp = appd->fp;
      appd1.level = appd->level+1;
      ProSolidFeatVisit (mdl, user_action, UserAsmCompFilter, [$appd1)]
  }
  if (feature != NULL)
      return(PRO_TK_NO_ERROR);
  return (PRO_TK_CONTINUE);
}
上面为后缀为.c文件,调试时出现如下错误,请哪为大虾帮帮忙。
fatal error C1010: unexpected end of file while looking for precompiled header directive
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
沙发
发表于 2003-4-3 11:25:04 | 只看该作者

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

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

x
板凳
发表于 2003-4-5 15:15:59 | 只看该作者

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

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

x
地板
 楼主| 发表于 2003-4-8 22:06:56 | 只看该作者

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

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

x
5
发表于 2003-4-8 22:35:14 | 只看该作者

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

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

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

本版积分规则

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

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

GMT+8, 2024-6-18 19:51 , Processed in 0.014325 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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