查看单个帖子
旧 2009-04-13, 10:21 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】diameter shaf

diameter shaft
there is problem when i draw a shaft.......
my method.
1) i draw circle and extruded
2)i draw another circle on the 1 circle and extruded
3)then i mirror the circle
4)i record this step as a macro
when i run my shaft is succeed to show.........
...........i..........
i i i
......i i i........
i 1 2 i 3 4 i
i..... i .........i
i i i
i..........i.........i
i
that is the figure of my shaft that i want to show.........
-my problem is my program only can insert the big size....
for example for shaft 1 and 2 i can put the diameter 8m above..........if i insert diameter with smaller size let say 0.008m the haft will not show........
can somebody help me.........
what does your code look like?
drc inc.
minneapolis, mn
.designreadycontrols.com
sw2007 sp5.0
core2 quad
3gb ram
xp pro sp2
ati firegl v3600
'circle
set swapp = application.sldworks
set part = swapp.activedoc
set selmgr = part.selectionmanager
swapp.activedoc.activeview.framestate = 1
part.clearselection2 true
dim skcircle as object
set skcircle = part.sketchmanager.createcircle(0, 0, 0, txt1.text, 5.605184485944e-04, 0)
part.clearselection2 true
boolstatus = part.extension.selectbyid2("arc1", "sketchsegment", 0, 0, 0, false, 0, nothing, 0)
part.featuremanager.featureextrusion2 true, false, false, 0, 0, txt2.text, txt2.text, false, false, false, false, 0.01745329251994, 0.01745329251994, false, false, false, false, 1, 1, 1, 0, 0, false
part.selectionmanager.enablecontourselection = 0
part.clearselection2 true
set swapp = application.sldworks
'mirror the circle
set swapp = application.sldworks
set part = swapp.activedoc
set selmgr = part.selectionmanager
swapp.activedoc.activeview.framestate = 1
boolstatus = part.extension.selectbyid2("front plane", "plane", 0, 0, 0, false, 0, nothing, 0)
boolstatus = part.extension.selectbyid2("", "face", 2.159662026272, 4.509529901473, 2.439799975864, true, 0, nothing, 0)
part.clearselection2 true
boolstatus = part.extension.selectbyid2("front plane", "plane", 0, 0, 0, false, 2, nothing, 0)
boolstatus = part.extension.selectbyid2("", "face", 2.159662026272, 4.509529901473, 2.439799975864, true, 1, nothing, 0)
part.featuremanager.insertmirrorfeature false, false, false, false
quick
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)