几何尺寸与公差论坛

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

【转帖】only vba

[复制链接]
发表于 2009-4-13 13:12:45 | 显示全部楼层 |阅读模式
only vba?
is that only visual basic application embedded in solid works?
originally posted by: zam 86
is that only visual basic application embedded in solid works?
zam,
as from sw2009 you can make sw macros in vba, vsta vb and vsta c#.
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
edited: 10/11/2008 at 04:34 am by jorn bjarning
i'm using solidwork 2008....that mean only vb embedded in it......
originally posted by: zam 86
i'm using solidwork 2008....that mean only vb embedded in it......
correct!
jorn bjarning
cswp
cad & plm consultant
sw2008 sp5 / sw2009 sp2
tq.bro.......god bless you.......
jorn;
i have a program (see below) that make a circle and revolved it. however, i want to get a windows message to ask me the folllowing:
1.- diameter of the circle.
2.- distance of the axis of revolution .
3.- angle of revolving
could yopu please tell me if is possible?
thnaks maperalia
'&&&&&&&&&&&&&&&&&&&
dim swapp as object
dim part as object
dim selmgr as object
dim boolstatus as boolean
dim longstatus as long, longwarnings as long
dim feature as object
sub main()
set swapp = application.sldworks
set part = swapp.activedoc
set selmgr = part.selectionmanager
part.clearselection2 true
dim skcircle as object
set skcircle = part.sketchmanager.createcircle(-0.09628480219746, 0, 0, -0.07566040614345, -0.007297863219111, 0)
part.clearselection2 true
boolstatus = part.extension.selectbyid2("arc1", "sketchsegment", -0.08898693897835, 0.01998979925235, 0, false, 0, nothing, 0)
dim annotation as object
set annotation = part.adddimension2(-0.0985059, 0.0402969, 0)
part.clearselection2 true
part.parameter("<A href="mailto:d1@sketch1").systemvalue">d1@sketch1").systemvalue = 0.254
part.viewzoomtofit2
part.clearselection2 true
dim skline as object
set skline = part.sketchmanager.createcenterline(0.08742431791818, -0.04545380291521, 0, 0.08742431791818, 0.09217021146695, 0)
part.clearselection2 true
boolstatus = part.extension.selectbyid2("line1", "sketchsegment", 0.0882660550092, 0.001262605636534, 5.000000000001e-05, false, 0, nothing, 0)
boolstatus = part.extension.selectbyid2("point2", "sketchpoint", -0.09628480219746, 0, 0, true, 0, nothing, 0)
set annotation = part.adddimension2(-0.00179981, -0.119106, 0)
part.clearselection2 true
part.parameter("<A href="mailto:d2@sketch1").systemvalue">d2@sketch1").systemvalue = 0.508
part.viewzoomtofit2
boolstatus = part.extension.selectbyid2("line1", "sketchsegment", 0.08742431791818, -0.04545380291521, 0, true, 0, nothing, 0)
part.shownamedview2 "*trimetric", 8
part.clearselection2 true
boolstatus = part.extension.selectbyid2("sketch1@part3.sldprt", "dimension", 0, 0, 0, false, 0, nothing, 0)
boolstatus = part.extension.selectbyid2("line1", "sketchsegment", 0.08742431791818, -0.04545380291521, 0, true, 4, nothing, 0)
boolstatus = part.extension.selectbyid2("sketch1", "sketch", 0, 0, 0, true, 0, nothing, 0)
part.featuremanager.featurerevolve 1.570796326795, false, 0, 0, 0, 1, 1, 1
part.selectionmanager.enablecontourselection = 0
part.viewzoomtofit2
end sub
'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-23 08:56 , Processed in 0.038206 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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