找回密码 注册 QQ登录
一站式解决方案

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
打印 上一主题 下一主题

【原创】手把手Pro/E二次开发

[复制链接]
61
发表于 2003-6-25 09:38:36 | 只看该作者
谢谢zzabccn,但加了之后还是一样,奇怪的是,怎么会出现许多头文件的错误。55555555--------------------Configuration: Toolkit2 - Win32 Debug--------------------
Compiling...
Toolkit2.cpp
e:\...\protoolkit\includes\promenu.h(53) : error C2065: 'uiCmdCmdId' : undeclared identifier
e:\..\protoolkit\includes\promenu.h(53) : error C2146: syntax error : missing ';' before identifier 'cmd_id'
e:\..\protoolkit\includes\promenu.h(53) : error C2065: 'cmd_id' : undeclared identifier
e:\..\protoolkit\includes\promenu.h(55) : error C2065: 'ProStringToWstring' : undeclared identifier
e:\..\protoolkit\includes\promenu.h(56) : error C2065: 'ProMenubarMenuAdd' : undeclared identifier
e:\..\protoolkit\includes\promenu.h(56) : error C2440: '=' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
e:\..\protoolkit\includes\promenu.h(57) : error C2065: 'ProMenubarmenuMenuAdd' : undeclared identifier
e:\..\protoolkit\includes\promenu.h(57) : error C2440: '=' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
e:\01.06.03.ptc_pro_engineer_2001_datecode_2002480_for_nt_iso-lnd\aaa\protoolkit\includes\promenu.h(58) : error C2065: 'ProCmdActionAdd' : undeclared identifier
e:\..\protoolkit\includes\promenu.h(58) : error C2065: 'uiCmdCmdActFn' : undeclared identifier
e:\..\protoolkit\includes\promenu.h(58) : error C2146: syntax error : missing ')' before identifier 'TestAccessDefault'
e:\..\protoolkit\includes\promenu.h(58) : error C2440: '=' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
e:\..\protoolkit\includes\promenu.h(58) : error C2059: syntax error : ')'
e:\..\protoolkit\includes\promenu.h(59) : error C2065: 'ProMenubarmenuPushbuttonAdd' : undeclared identifier
e:\..\protoolkit\includes\promenu.h(59) : error C2440: '=' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
e:\..\protoolkit\includes\prouicmd.h(135) : error C2378: 'uiCmdCmdId' : redefinition; symbol cannot be overloaded with a typedef
e:\..\protoolkit\includes\prouicmd.h(142) : error C2146: syntax error : missing ')' before identifier 'command'
e:\..\protoolkit\includes\prouicmd.h(142) : error C2378: 'uiCmdCmdActFn' : redefinition; symbol cannot be overloaded with a typedef
e:\..\protoolkit\includes\prouicmd.h(142) : error C2071: 'uiCmdCmdActFn' : illegal storage class
e:\..\protoolkit\includes\prouicmd.h(144) : error C2059: syntax error : ')'
e:\..\protoolkit\includes\prouicmd.h(175) : error C2146: syntax error : missing ')' before identifier 'command'
e:\..\protoolkit\includes\prouicmd.h(175) : error C2071: 'uiCmdCmdValFn' : illegal storage class
e:\..\protoolkit\includes\prouicmd.h(176) : error C2059: syntax error : ')'
e:\..\protoolkit\includes\prouicmd.h(203) : error C2146: syntax error : missing ')' before identifier 'command'
e:\.\protoolkit\includes\prouicmd.h(203) : error C2071: 'uiCmdCmdBktFn' : illegal storage class
e:\..\protoolkit\includes\prouicmd.h(206) : error C2059: syntax error : ')'
e:\..\protoolkit\includes\promenubar.h(45) : error C2061: syntax error : identifier 'uiCmdCmdActFn'
e:\..\protoolkit\includes\promenubar.h(50) : error C2373: 'ProCmdActionAdd' : redefinition; different type modifiers
e:\..\protoolkit\includes\promenubar.h(85) : error C2061: syntax error : identifier 'uiCmdCmdActFn'
e:\..\protoolkit\includes\promenubar.h(129) : error C2146: syntax error : missing ')' before identifier 'cmd_id'
e:\..\protoolkit\includes\promenubar.h(129) : error C2440: 'initializing' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
e:\..\protoolkit\includes\promenubar.h(132) : error C2059: syntax error : ')'
e:\01.06.03.ptc_pro_engineer_2001_datecode_2002480_for_nt_iso-lnd\aaa\protoolkit\includes\promenubar.h(158) : error C2061: syntax error : identifier 'uiCmdCmdId'
e:\..\protoolkit\includes\promenubar.h(174) : error C2146: syntax error : missing ')' before identifier 'cmd_id'
e:\..\protoolkit\includes\promenubar.h(174) : error C2440: 'initializing' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
e:\..\protoolkit\includes\promenubar.h(176) : error C2059: syntax error : ')'
e:\..\protoolkit\includes\promenubar.h(196) : error C2146: syntax error : missing ')' before identifier 'cmd_id'
e:\..\protoolkit\includes\promenubar.h(196) : error C2440: 'initializing' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
e:\..\protoolkit\includes\promenubar.h(197) : error C2059: syntax error : ')'
e:\01.06.03.ptc_pro_engineer_2001_datecode_2002480_for_nt_iso-lnd\aaa\protoolkit\includes\promenubar.h(219) : error C2373: 'ProMenubarMenuAdd' : redefinition; different type modifiers
e:\..\protoolkit\includes\promenubar.h(252) : error C2373: 'ProMenubarmenuMenuAdd' : redefinition; different type modifiers
e:\..\protoolkit\includes\promenubar.h(285) : error C2061: syntax error : identifier 'uiCmdCmdId'
e:\..\protoolkit\includes\promenubar.h(286) : error C2373: 'ProMenubarmenuPushbuttonAdd' : redefinition; different type modifiers
e:\..\protoolkit\includes\promenubar.h(332) : error C2061: syntax error : identifier 'uiCmdCmdId'
e:\..\protoolkit\includes\promenubar.h(425) : error C2061: syntax error : identifier 'uiCmdCmdId'
e:\..\protoolkit\includes\proutil.h(431) : error C2373: 'ProStringToWstring' : redefinition; different type modifiers
E:\联合测试\Toolkit2\Toolkit2.cpp(91) : error C2146: syntax error : missing ';' before identifier 'cmd_id'
E:\联合测试\Toolkit2\Toolkit2.cpp(97) : error C2440: '=' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
E:\联合测试\Toolkit2\Toolkit2.cpp(101) : error C2440: '=' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
E:\联合测试\Toolkit2\Toolkit2.cpp(108) : error C2146: syntax error : missing ')' before identifier 'Check'
E:\联合测试\Toolkit2\Toolkit2.cpp(108) : error C2440: '=' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
E:\联合测试\Toolkit2\Toolkit2.cpp(109) : error C2059: syntax error : ')'
E:\联合测试\Toolkit2\Toolkit2.cpp(113) : error C2440: '=' : cannot convert from 'int' to 'enum ProErrors'
        Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
E:\联合测试\Toolkit2\Toolkit2.cpp(119) : error C2084: function 'void __cdecl user_terminate(void)' already has a body
E:\联合测试\Toolkit2\Toolkit2.cpp(119) : error C2732: linkage specification contradicts earlier specification for 'user_terminate'
        E:\联合测试\Toolkit2\Toolkit2.cpp(118) : see declaration of 'user_terminate'
Error executing cl.exe.
  
Toolkit2.dll - 55 error(s), 0 warning(s)
62
发表于 2003-6-25 11:29:39 | 只看该作者
可以了,谢谢各位
一个字 牛
63
发表于 2003-6-26 08:41:52 | 只看该作者
TOOL wrote:
添加相关头文件

  
请问Tool等:做ProE的对话框具体需要添加哪些头文件,
我总是找不到OK和CANCEL的定义,找遍了都,后来自己定义了一个,
可是我的对话框不是OK和CANCEL,而是Yes,No的,并且不工作(退不出),我上上一篇回复本帖有图。
64
发表于 2003-6-26 08:51:36 | 只看该作者
ok
cancle
自定义
#define ……
65
发表于 2003-6-26 11:00:33 | 只看该作者
多看User'sGuid 会有帮助??!!%……¥%×%※
这个confirm 对话框的.res 文件,要用proe 安装点\text\resource 下的confirm.res 才会好用(也就是指定的question会出来),
User'sGuid 的example 7 (Tool给的)那个好像不行(可是Tool有截图啊,呵呵??……%×※……),
  
confirm.res 要放到 text\resource  目录下,,,哎,看了才知道。
可是我的对话框怎么不退出呀,yes no都没反映,也不下去。
  
¥%※…………※×(※()我晕啦,,,,
研究中。。。。
66
发表于 2003-6-26 11:33:15 | 只看该作者
就是参考user guide里面的example
再找找原因,可以的
confirm.res 要放到 text\resource 目录下
这个确实很重要
和菜单资源文件一样
67
发表于 2003-6-26 13:33:28 | 只看该作者
汇报工作:这次真的好用了,留给后来人参阅吧,再次感谢TOOL
我的confirm.res:
  
(Dialog confirm
     (Components
         (PushButton                     OK)
         (PushButton                     Cancel)
         (Label                          msg)
         (Separator                      Separator1)
      )
   
     (Resources
         (OK.Label                  "Yes")
         (OK.AttachTop              True)
         (OK.AttachBottom           True)
         (OK.TopOffset              10)
         (OK.BottomOffset           10)
         (Cancel.Label                   "NO")
         (Cancel.AttachTop               True)
         (Cancel.AttachBottom            True)
         (Cancel.TopOffset               10)
         (Cancel.BottomOffset            10)
         (msg.Bitmap                     "UI question image")
         (msg.Label                      " Do you really love this forum? ")
         (msg.Columns                    10)
         (msg.AttachTop                  True)
         (msg.AttachBottom               True)
         (msg.TopOffset                  10)
         (msg.BottomOffset               10)
         (Separator1.AttachBottom        True)
         (Separator1.TopOffset           0)
         (Separator1.BottomOffset        0)
         (Separator1.LeftOffset          0)
         (Separator1.RightOffset         0)
         (.Label                         "CONFIRMATION")
         (.StartLocation                 5)
         (.DefaultButton                 "Yes")
         (.RememberSize                  False)
         (.Layout
             (Grid (Rows 1 1 0) (Cols 1)
                 msg
                 Separator1
                 (Grid (Rows 0) (Cols 1 1 1)
                     OK
                 (Pos 1 3)
                     Cancel
                  )
              )
          )
      )
)
68
发表于 2003-6-27 10:23:38 | 只看该作者
TOOL wrote:
添加链接库(非常重要的一步)

  
我按照你说的方法设置环境,但是出现以下问题(附图),请赐教!
69
发表于 2003-6-30 09:24:17 | 只看该作者
我在做这个例子的时候,程序在VC上编译,连接都能通过,但在proe上注册运行时,再在VC上连接时出现 Linking...
LINK : fatal error LNK1104: cannot open file "Debug/Toolkit.dll"
Error executing link.exe.
一般是什么问题啊??急问!!!!!!!!!!!!!
70
发表于 2003-6-30 11:02:49 | 只看该作者
pro/e占用着吧?先关了pro/e,再编译。
每重新编译完,再重新注册时,都要重新打开pro/e的(第二次打开会快一些)。
TOOL告诉过我,否则还在内存中,看不到新的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2025-2-1 14:55 , Processed in 0.031005 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2025 www.iCAx.org

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