几何尺寸与公差论坛

 找回密码
 注册
查看: 713|回复: 0

【转帖】model scaling

[复制链接]
发表于 2009-4-13 12:51:34 | 显示全部楼层 |阅读模式
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)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 13:45 , Processed in 0.037630 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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