几何尺寸与公差论坛------致力于产品几何量公差标准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, 10:11 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】data storage in sw docs

data storage in sw docs
i am looking for a way to write data (just some plain text) to a solidworks document (sldprt, sldasm, slddrw) in such a way so that the data cannot be accessed or manipulated by the end user. we would prefer that the user does not even know the data exists. today we are writing data to various custom properties but that has become somewhat problematic because we think the users are manipulating that data (outside of using our program) that is causing some problems and we have also found that there is a character limitation in custom properties that prevents us from writing all the data that we would like to write.
we tried writing the data to an excel spreadsheet that was contained in the design binder but that caused problems because once opened the spreadsheet would not close and of course that data is accessible to the user for manipulation.
i have also thought about using a general table and hiding the table so that it cannot be seen in the drawing window but it is still visible in th feature tree.
does anyone know how to insert a general table but not have it show in the feature tree?
so in summary here is what we are wanting to do:
1. store unlimited amounts of text data inside of a sw document (sldprt, sldasm, slddrw) via the api.
2. the data should only be accessible via the api, the user should not be able to access or manipulate the data.
thanks for any suggestions, and if you like you can just laugh at me for asking the question...
take a look at modeldoc2::iget3rdpartystorage in the api help.
look up "attributes" in sw api help.
michael, this looks like exactly what we want to do.
thanks...
glad someone pointed that out. i was about to mention tagging data on to the end of the native file after the terminating \0, which gives you unlimited storage, however it can be tricky to access, and can be picked up as a trojan by some av
luke,
that idea would lead to the crash of sw,because the total size counter and checksum would be damaged and i an not sure sw is not so delicate to handle that bugs correctly
regards, basil
"and when you loose control,
you'll reap the harvest you have sown..." (c) pink floyd
solidworks 2008 x64 sp5.0 (production)
solidworks 2009 x64 sp2.0 (testing)
windows xp x64 sp2
core2quad 6600, 4gb ram, 500gb sata, ati firegl v7700 1024mb (softmodded from hd3850), 19" tft
depends how it gets its own file size. some programs simply check by running a count of bytes up until \0, but others (such as anti-virus) software check total bytes regardless of termination characters, this is how they are able to detect possible virii so quickly.
nevermind, the other idea sounds better anyway.
i think rolands way is easiest to handle. write hidden attributes to model so user can not change them unless he/she is familiar with solidworks api.
it does not need big problem, if it is in your head
quick
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】blocks-autocad to sw yang686526 SolidWorks二次开发 0 2009-04-13 09:18 AM
there are three terrible questions on SW translator as below huangyhg SolidWorks二次开发 3 2007-09-04 01:38 PM
How to start SW 2007 or SW 20006 via SW API? If I have two different versions of SW yogy SolidWorks二次开发 1 2007-05-21 09:19 AM


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


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