几何尺寸与公差论坛

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

【转帖】how to get distance bw dimentions

[复制链接]
发表于 2009-4-12 18:33:51 | 显示全部楼层 |阅读模式
how to get distance b/w dimentions
i want to know the distance of a give dimention i am saving my dimention pointer here below.
part.adddimension2(1, 0, 0)
dim swselmgr as selectionmgr
swselmgr = part.selectionmanager
dim dispdim as displaydimension = swselmgr.getselectedobject5(1)
dim dm as dimension = dispdim.getdimension2(0)
regards,
aqeel
this?
option explicit
sub main()
dim swapp as sldworks.sldworks
dim part as modeldoc2
set swapp = application.sldworks
set part = swapp.activedoc
dim swselmgr as selectionmgr
dim ddm as displaydimension
dim dm as dimension
set swselmgr = part.selectionmanager
if swselmgr.getselectedobjectcount <> 2 then
msgbox "select 2 entities"
exit sub
end if
set ddm = part.adddimension2(0, 0, 0)
set dm = ddm.getdimension
msgbox dm.value
end sub
thanx ivana.................. have a goodday
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-22 23:22 , Processed in 0.034818 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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