几何尺寸与公差论坛

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

【转帖】change value of angle mate in macro

[复制链接]
发表于 2009-4-13 09:39:06 | 显示全部楼层 |阅读模式
change value of angle mate in macro
is there an easy way to increment the value of a named angle mate through a macro? i have created a macro that will capture a screenshot and save as a jpeg; want to move two parts joined by this mate (called angmate) one degree, then capture the screen.
the reason i don't want to just use the animation features, by the way, is that each time it shoots a raytrace thru optisworks before performing this screen capture; i want to see the movement of light through a complex system as the light source passes through an arc, overhead.
thanks in advance.
hi danielle,
have a look at mate2:: displaydimension2
and have a look at the example available:
edit mate example (vb)
cheers,
--stav
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
thanks for the tip. i'd looked that example over, but wondered if there were something simpler.
to give an example of what i mean by "simple;" when running the raytrace in optisworks, i couldn't find an api call that would do the trick. so i applied a hotkey to that command, and then in my macro i use sendkeys to send the hotkey to trigger that command.
i'm no expert at vba and wondered if there were similar quick tricks that could get me to the result i seek. (one other idea, i suppose, is to create configurations with various settings for this dimension and scroll through them, and/or use a design table. my problem with those is that i want to increment only one degree at a time, and move the light source through an entire 180 degree arc; that would mean 180 configs!)
could i somehow (i assume this would be through a design table) assign a variable to that one constraint, and then update the variable and rebuild each time? it sounds easier than the example in the api help...
thanks!
danielle
it looks like what i will want to do, is create a construction line in the assembly, and snap the object i want to rotate to its end. it will need to have an angular dimension to another construction line; i can easily address that number in a macro and save myself tons of time. i'd ultimately prefer to learn the more complicated procedures that alter a mate, but right now i have to make this animation for a client. hopefully i'll get to this, tonight, and will know if it was in fact easier...
thanks!
danielle
edited: 07/21/2008 at 12:37 pm by danielle o'hallisey
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-24 08:03 , Processed in 0.082840 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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