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

model scaling
i'm trying to scale a revolved model that will represent mmc and lmc conditions. imagine a piece of tubing. i have a scale factor, but when applied, it scales everything upward or downward. i'm looking for bi-directional. for mmc conditon, inside diameters should be smaller and the od should be larger, but they aren't. think of the tube wall getting thicker while maintaining the same mean diameter.
scaling seems to be uni-directional. even though you can control x, y, and z, it doesn't appear as though you can control it bi-directionally.
have i lost anyone? any suggestions are appreciated.
christopher zona - product designer
concord, ontario
find a job or post a job opening
i think tolanalyst is supposed to be able to do stuff like this. alternately, attached is a macro that is supposed to be able to do this as well. it will add two configurations, an lmc and an mmc, and go through the model checking for dimensions with tolerance. it then goes through and sets each dim to both values, checking the mass after change. if mass went up, it's mmc. if mass went down, it's lmc. it's been quite a while since i wrote this. of course, as with any macro it could screw up your model, so please save first.
-handleman, cswp (the new, easy test)
thanks, i'll give it a try.
christopher zona - product designer
concord, ontario
if it's simple as a piece of tubing, just create two instances: one at mmc and one for lmc.
handleman,
i don't seem to be having an luck. i went through the sketches and added tolerances where needed and ran the macro.
it didn't seem to respond. nothing happened. but, i also didn't get any erro messages. i'm just wondering, we are still on sw2005. was your macro written after that?
christopher zona - product designer
concord, ontario
it's possible. however, you should have at least gotten an error message if it was a version issue. i'm thinking that maybe the macro is just starting with the wrong procedure. the macro needs to start with the "createmcconfigs()" sub. there's no way to know which one it will start with if you just go tools->macro->run... there are two ways to specify which sub to start with. one is to map a macro button to that .swp file and choose the proper sub in the "method" box. the other is to bring up the vba editor, place the cursor in the sub you want to run, and hit the "play" button on the toolbar. give that a shot an let me know what happens.
-handleman, cswp (the new, easy test)
handleman,
thanks for the help, but unfortunately this code was witten for 2006, which won't work for me.
i'll try to figure something else out.
regards,
christopher zona - product designer
concord, ontario
christopher,
where is it coming up with an error? the sw api didn't change a whole lot between '05 and '06. go into tools->references and checkmark the 2005 versions of any libraries that show up as missing. then try to run the macro and let me know what line it comes up with an error on. i'd be very surprised if it's not easily modifiable to run in 2005.
-handleman, cswp (the new, easy test)
handleman,
here's the missing library information.
christopher zona - product designer
concord, ontario
if you will scroll down in that list there should be a 2005 version of each of those missing references. un-check the 2006 versions and check the 2005 versions. alternately, you could record a new macro (doesn't matter what the macro does) and then delete the entire thing and paste in the entire text of the macro i posted. then run the createmcconfigs() sub and let me know where/if it hits an error and what the error is.
there are two possibilities i'm thinking of. one is that 2006 introduced a new version of some function. when they do that, they just stick a 2 on the end of the name and add some extra functionality. the older version usually still does what you need it to, you just have to switch the code to use the old version.
the other possibility is that at some point solidworks started including that constant type library. it lets you use predefined named constants in your code for readability rather than having to put in just a number. i can't remember when that change was made.
either of these possibilities is pretty easy to remedy.
-handleman, cswp (the new, easy test)
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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



所有的时间均为北京时间。 现在的时间是 03:13 PM.


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