几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-04-13, 02:07 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】sdk wizard for c==

sdk wizard for c++
hi,
i'm trying to create an addin, in in c++, using ms visual studio.net 2003 and solidworks 2008 sdk.
the code generated by wizard can be compiled only in debug mode. if i switch to release mode, it just don't compile.
i took a look at the project properties and saw that the wizard configures the project only for debug mode.
did any one have the same problem?
tanks in advance.
vinicius
yes! - we have had the same problem.
i have wasted a lot of time playing around trying to get our new projects to build in release mode after creating new projects using this sdk, but even having got it to compile, it still doesn't seem to work properly in solidworks! - calls to (for example) m_psolidworks->get_iactivedoc2(&lpmodel) always return no model. - command works fine in a debug build, but just cannot get them to work in release builds from these projects!
let us know if you get anything working in a a release build for you, please!
thanks,
chris.
what error do you get when compiling?
i have used the solidworks 2008 template project, created a new project using it in visual studio 2005 and that will build using debug build.
however, building switching to release mode fails to build with these errors:
c:\temp\testaddin\testaddin\stdafx.h(49) : fatal error c1083: cannot open type library file: 'swpublished.tlb': no such file or directory
so, i add the missing path to the "additional include directories" of the release project and rebuild.
i then get error:
.\bitmaphandler.cpp(45) : error c2440: '=' : cannot convert from 'bstr' to 'lptstr'
so, at this point i start working through the project settings, finding lots of differences between the debug and release project. (eg "configuration properties - general - configuration type" is set to "application (.exe)" instead of "dyanamic library (.dll)", "use of mfc" not set, "character set" incorrect).
basically, it just looks like the release projects haven't been set at all for the starter templates.
you dont have a working, correctly configured starter project / template set for a solidworks 2008 (we also need to support back to 2007) project do you? - or know of a downloadable version somewhere?
we have recently upgraded an older project to a new project under solidworks 2008. - everything has built and tested fine using the debug builds, we have made lots of changes to the release build to get it to link and build correctly, but when running the release dll it always fails (to start with!) on calls to the function "m_psolidworks->get_iactivedoc2(&lpmodel)" when enabling / disabling menu options (depending on whether there is an open model or not!)
thanks!
chris.
sounds like either the 2008 template has lost its details or converts down badly to 2005 causing invalid project settings, or they had to tweak the template to work and forgot to do the release configuration too.
as for a template; my new book covers add-ins in depth in the first chapter and i may create a template for use with 2005-2008 i will see how it goes when i get to that.
well... thanks for your help!
i'll contact solidworks api support direct and see if i can get a working project from them...
thanks,
chris.
quick
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】hole wizard end conditions1 yang686526 SolidWorks二次开发 0 2009-04-13 11:47 AM
【转帖】flip direction of hole wizard feature yang686526 SolidWorks二次开发 0 2009-04-13 10:57 AM
【转帖】default settings in hole wizard yang686526 SolidWorks二次开发 0 2009-04-13 10:13 AM


所有的时间均为北京时间。 现在的时间是 11:59 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多