|
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 |
|